Merge pull request #6262 from betagouv/fix-statistiques-public
Fixe un bug dans le users/statistiques controller
This commit is contained in:
commit
4fe223a650
1 changed files with 10 additions and 0 deletions
|
@ -17,5 +17,15 @@ module Users
|
|||
def procedure
|
||||
Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path])
|
||||
end
|
||||
|
||||
def procedure_not_found
|
||||
if procedure&.close?
|
||||
flash.alert = t('errors.messages.procedure_archived')
|
||||
else
|
||||
flash.alert = t('errors.messages.procedure_not_found')
|
||||
end
|
||||
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue