Returns "there are no ballots to view yet" rather than 404ing when the ballot link is followed for a document that exists.

It is typical for last call to be issued (which includes a link to the ballot page) well in advance of creating any ballot for a document.
Fixes bug 1233
Commit ready for merge
 - Legacy-Id: 7077
This commit is contained in:
Robert Sparks 2014-01-07 23:16:44 +00:00
parent a3da5bbd87
commit e93b5ec296

View file

@ -650,7 +650,7 @@ def document_ballot_content(request, doc, ballot_id, editable=True):
ballot = all_ballots[-1]
if not ballot:
raise Http404
return "<p>No ballots are available for this document at this time.</p>"
deferred = doc.active_defer_event()