From a9c6cc322a1560799c868bc10cf0d1b881f291bb Mon Sep 17 00:00:00 2001 From: Eric Leroy-Terquem Date: Thu, 25 May 2023 16:02:47 +0200 Subject: [PATCH] feat(routing): do not run routing engine if dossier has been re routed --- app/models/routing_engine.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/routing_engine.rb b/app/models/routing_engine.rb index b08cc4bf8..385acda3b 100644 --- a/app/models/routing_engine.rb +++ b/app/models/routing_engine.rb @@ -1,6 +1,7 @@ module RoutingEngine def self.compute(dossier) return if !dossier.procedure.feature_enabled?(:routing_rules) + return if dossier.forced_groupe_instructeur matching_groupe = dossier.procedure.groupe_instructeurs.active.reject(&:routing_to_configure?).find do |gi| gi.routing_rule&.compute(dossier.champs)