fix fix champ etablissement

This commit is contained in:
Christophe Robillard 2020-05-27 18:44:22 +02:00
parent 1e8827500b
commit a923215139

View file

@ -11,7 +11,7 @@ namespace :after_party do
dossier = e.dossier dossier = e.dossier
if user.dossiers.count == 1 && user.siret == e.champ.value if user.dossiers.count == 1 && user.siret == e.champ.value
e.update!(dossier_id: nil) e.update!(dossier_id: nil)
dossier.etablissement = e.dup dossier.reload.etablissement = e.reload.dup
dossier.save! dossier.save!
dossiers_modif << dossier.id dossiers_modif << dossier.id
fetch_api_entreprise_infos(dossier.etablissement.id, dossier.procedure.id, user.id) fetch_api_entreprise_infos(dossier.etablissement.id, dossier.procedure.id, user.id)