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
if dossier.present?
params.merge(
entreprise_attributes: entreprise_params
.merge({
dossier: dossier,
rna_information_attributes: association_params
}.compact)
params[:entreprise_attributes] = entreprise_params.merge(
{
dossier: dossier,
rna_information_attributes: association_params
}.compact
)
else
params
end
params
end
end