Skip to content
Snippets Groups Projects
Commit 2ccca0b3 authored by Ben Adida's avatar Ben Adida
Browse files

proper 404 on bad voter URL

parent 7346a30b
No related branches found
No related tags found
No related merge requests found
......@@ -1199,6 +1199,8 @@ def one_voter(request, election, voter_uuid):
View a single voter's info as JSON.
"""
voter = Voter.get_by_election_and_uuid(election, voter_uuid)
if not voter:
raise Http404
return voter.toJSONDict()
@election_view()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment