diff --git a/app/models/prefill_params.rb b/app/models/prefill_params.rb index d048a3d2d..2ed7cfc8b 100644 --- a/app/models/prefill_params.rb +++ b/app/models/prefill_params.rb @@ -57,11 +57,11 @@ class PrefillParams end def prefillable? - champ.prefillable? && valid? + champ.prefillable? && valid? && champ_attributes.present? end def champ_attributes - TypesDeChamp::PrefillTypeDeChamp + @champ_attributes ||= TypesDeChamp::PrefillTypeDeChamp .build(champ.type_de_champ, dossier.revision) .to_assignable_attributes(champ, value) end