[#1868] ProcedureController: rescue date parsing
This commit is contained in:
parent
2a0b92ad3e
commit
6b422ceb7a
1 changed files with 2 additions and 1 deletions
|
@ -237,9 +237,10 @@ module NewGestionnaire
|
|||
|
||||
when 'user', 'etablissement', 'entreprise'
|
||||
if filter['column'] == 'date_creation'
|
||||
date = filter['value'].to_date rescue nil
|
||||
dossiers
|
||||
.includes(filter['table'])
|
||||
.where("#{filter['table'].pluralize}.#{filter['column']} = ?", filter['value'].to_date)
|
||||
.where("#{filter['table'].pluralize}.#{filter['column']} = ?", date)
|
||||
else
|
||||
dossiers
|
||||
.includes(filter['table'])
|
||||
|
|
Loading…
Reference in a new issue