AdminProcedureController: fix self assignation as instructeur
This commit is contained in:
parent
ad31822a68
commit
efd793f266
1 changed files with 1 additions and 4 deletions
|
@ -76,10 +76,7 @@ class Admin::ProceduresController < AdminController
|
|||
render 'new'
|
||||
else
|
||||
flash.notice = 'Démarche enregistrée.'
|
||||
instructeur = Instructeur.find_by(email: current_administrateur.email)
|
||||
if instructeur
|
||||
instructeur.assign_to_procedure(@procedure)
|
||||
end
|
||||
current_administrateur.instructeur.assign_to_procedure(@procedure)
|
||||
|
||||
redirect_to champs_procedure_path(@procedure)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue