From 43e870e9ecce02fb37a8813496e7df79047420f1 Mon Sep 17 00:00:00 2001 From: Eric Leroy-Terquem Date: Tue, 5 Mar 2024 14:49:54 +0100 Subject: [PATCH] fix(attestation depot): run routing engine before sending notifications --- app/models/dossier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 936b5e9a9..ab0dabc22 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -891,11 +891,11 @@ class Dossier < ApplicationRecord .passer_en_construction .processed_at save! + RoutingEngine.compute(self) MailTemplatePresenterService.create_commentaire_for_state(self, Dossier.states.fetch(:en_construction)) NotificationMailer.send_en_construction_notification(self).deliver_later NotificationMailer.send_notification_for_tiers(self).deliver_later if self.for_tiers? procedure.compute_dossiers_count - RoutingEngine.compute(self) end def submit_en_construction!