Add 'Vote not found'

This commit is contained in:
ricola 2026-01-09 16:05:03 -06:00
parent ec173f450d
commit 33bc3e1446
2 changed files with 17 additions and 10 deletions

View file

@ -319,17 +319,21 @@ end
get '/votes/:id' do
require_login
find_vote
case @vote.state
when 'draft'
if @vote.users.exists?(current_user.id)
erb :votes_edit
else
erb :votes_show_draft
if not @vote
erb :votes_show_unknown
else
case @vote.state
when 'draft'
if @vote.users.exists?(current_user.id)
erb :votes_edit
else
erb :votes_show_draft
end
when 'open'
erb :votes_show_open
when 'closed'
erb :votes_show_closed
end
when 'open'
erb :votes_show_open
when 'closed'
erb :votes_show_closed
end
end