Simplify SIRETService#fetch

This commit is contained in:
gregoirenovel 2018-03-19 15:27:12 +01:00
parent 4b6b583120
commit 7794973774

View file

@ -16,16 +16,15 @@ class SIRETService
# This is to fill legacy models and relationships # This is to fill legacy models and relationships
if dossier.present? if dossier.present?
params.merge( params[:entreprise_attributes] = entreprise_params.merge(
entreprise_attributes: entreprise_params {
.merge({ dossier: dossier,
dossier: dossier, rna_information_attributes: association_params
rna_information_attributes: association_params }.compact
}.compact)
) )
else
params
end end
params
end end
end end