Merge pull request #1870 from betagouv/fix_1868_bad_filter
[#1868] ProcedureController: rescue date parsing
This commit is contained in:
commit
cd7a73075c
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