If type de champ has no dropdownlist do not crash, (sentry issue: https://sentry.apientreprise.fr/apientreprise/tps_dev/issues/1833/)

This commit is contained in:
Mathieu Magnin 2017-09-22 12:38:37 +02:00
parent 9ea4c46920
commit 45cf26e855

View file

@ -1,6 +1,7 @@
= render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ } = render partial: 'new_gestionnaire/dossiers/champs/champ_label', locals: { form: form, champ: champ }
= form.select :value, - if champ.drop_down_list && champ.drop_down_list.options.any?
champ.drop_down_list.options, = form.select :value,
disabled: champ.drop_down_list.disabled_options, champ.drop_down_list.options,
required: champ.mandatory disabled: champ.drop_down_list.disabled_options,
required: champ.mandatory