[#1868] ProcedureController: rescue date parsing

This commit is contained in:
simon lehericey 2018-04-25 11:39:36 +02:00
parent 2a0b92ad3e
commit 6b422ceb7a

View file

@ -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'])