controllers: unload failed avis from dossier

This avoid the subsequent dossier update to fail because some Avis
may be invalid.
This commit is contained in:
Pierre de La Morinerie 2021-03-30 19:44:57 +02:00
parent 9096a3885c
commit 95b6fdf86d

View file

@ -34,6 +34,7 @@ module CreateAvisConcern
end
end
)
dossier.avis.reload # unload non-persisted avis from dossier
persisted, failed = create_results.partition(&:persisted?)