Add procedure gestionnaire_for_cron_job method
This commit is contained in:
parent
15b1499e5d
commit
a079eaea5c
1 changed files with 6 additions and 0 deletions
|
@ -358,6 +358,12 @@ class Procedure < ApplicationRecord
|
|||
where.not(aasm_state: :archivee).where("path LIKE ?", "%#{path}%")
|
||||
end
|
||||
|
||||
def gestionnaire_for_cron_job
|
||||
administrateur_email = administrateur.email
|
||||
gestionnaire = Gestionnaire.find_by(email: administrateur_email)
|
||||
gestionnaire || gestionnaires.first
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def claim_path_ownership!(path)
|
||||
|
|
Loading…
Reference in a new issue