Prevent double processing of declarative dossiers
This commit is contained in:
parent
3bd6df8bbf
commit
1888f74b10
5 changed files with 24 additions and 7 deletions
|
@ -606,10 +606,12 @@ class Procedure < ApplicationRecord
|
|||
when Procedure.declarative_with_states.fetch(:en_instruction)
|
||||
dossiers
|
||||
.state_en_construction
|
||||
.where(declarative_triggered_at: nil)
|
||||
.find_each(&:passer_automatiquement_en_instruction!)
|
||||
when Procedure.declarative_with_states.fetch(:accepte)
|
||||
dossiers
|
||||
.state_en_construction
|
||||
.where(declarative_triggered_at: nil)
|
||||
.find_each(&:accepter_automatiquement!)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue