Merge pull request #6262 from betagouv/fix-statistiques-public

Fixe un bug dans le users/statistiques controller
This commit is contained in:
Paul Chavard 2021-06-08 18:22:07 +02:00 committed by GitHub
commit 4fe223a650
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,5 +17,15 @@ module Users
def procedure def procedure
Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path]) Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path])
end 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
end end