[#3477] ignore invalid dates for now

This commit is contained in:
Frederic Merizen 2019-02-27 12:35:08 +01:00 committed by Frederic Merizen
parent 0ba3515d41
commit f0d83b1de8

View file

@ -118,7 +118,9 @@ class ProcedurePresentation < ApplicationRecord
.filter_ilike(:champ, :value, values)
when 'etablissement'
if column == 'entreprise_date_creation'
dates = values.map { |v| v.to_date rescue nil }
dates = values
.map { |v| v.to_date rescue nil }
.compact
dossiers
.includes(table)
.where(table.pluralize => { column => dates })