Merge pull request #9534 from demarches-simplifiees/unroute-cloned-procedures-from-different-admin
Correction (2e essai) : désactive le routage de procédures clonées ou l'admin n'était pas aussi admin de la procédure parente
This commit is contained in:
commit
6ba4f901c7
1 changed files with 3 additions and 1 deletions
|
@ -8,7 +8,9 @@ namespace :after_party do
|
|||
.with_discarded
|
||||
.where(routing_enabled: true)
|
||||
.filter { |p| p.groupe_instructeurs.active.count == 1 }
|
||||
.update_all(routing_enabled: false)
|
||||
.each do |p|
|
||||
p.update!(routing_enabled: false)
|
||||
end
|
||||
|
||||
# Update task as completed. If you remove the line below, the task will
|
||||
# run with every deploy (or every time you call after_party:run).
|
||||
|
|
Loading…
Reference in a new issue