fix(prefill): don't create Individual for non-individual procedures
Closes #9486
This commit is contained in:
parent
ae2d9bba47
commit
8358fec884
2 changed files with 24 additions and 1 deletions
|
@ -8,7 +8,7 @@ module DossierPrefillableConcern
|
|||
|
||||
attributes = { prefilled: true }
|
||||
attributes[:champs_attributes] = champs_attributes.map { |h| h.merge(prefilled: true) }
|
||||
attributes[:individual_attributes] = identity_attributes
|
||||
attributes[:individual_attributes] = identity_attributes if identity_attributes.present?
|
||||
|
||||
assign_attributes(attributes)
|
||||
save(validate: false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue