Fix bug procedure_path does not exist
This commit is contained in:
parent
12af46a22a
commit
8f5ad1af35
1 changed files with 8 additions and 1 deletions
|
@ -27,7 +27,14 @@ class Users::DossiersController < UsersController
|
|||
|
||||
def commencer
|
||||
unless params[:procedure_path].nil?
|
||||
procedure = ProcedurePath.where(path: params[:procedure_path]).last.procedure
|
||||
procedure_path = ProcedurePath.where(path: params[:procedure_path]).last
|
||||
|
||||
if procedure_path.nil?
|
||||
flash.alert = "Procédure inconnue"
|
||||
return redirect_to root_path
|
||||
else
|
||||
procedure = procedure_path.procedure
|
||||
end
|
||||
end
|
||||
|
||||
if procedure.archived?
|
||||
|
|
Loading…
Add table
Reference in a new issue