Merge pull request #6329 from betagouv/fix-stat-archives
a user can now see stats for closed procedure
This commit is contained in:
commit
eebe04c35e
1 changed files with 2 additions and 7 deletions
|
@ -16,16 +16,11 @@ module Users
|
||||||
private
|
private
|
||||||
|
|
||||||
def procedure
|
def procedure
|
||||||
Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path])
|
Procedure.publiees_ou_closes.find_by(path: params[:path])
|
||||||
end
|
end
|
||||||
|
|
||||||
def procedure_not_found
|
def procedure_not_found
|
||||||
if procedure&.close?
|
flash.alert = t('errors.messages.procedure_not_found')
|
||||||
flash.alert = t('errors.messages.procedure_archived')
|
|
||||||
else
|
|
||||||
flash.alert = t('errors.messages.procedure_not_found')
|
|
||||||
end
|
|
||||||
|
|
||||||
redirect_to root_path
|
redirect_to root_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue