feat(routing): do not run routing engine if dossier has been re routed

This commit is contained in:
Eric Leroy-Terquem 2023-05-25 16:02:47 +02:00
parent 18054fe346
commit a9c6cc322a

View file

@ -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)