Added a guard against trying to fetch ad positions when there's no active ballot.

- Legacy-Id: 9722
This commit is contained in:
Henrik Levkowetz 2015-07-15 10:50:27 +00:00
parent 56ca34090c
commit d8da10756d

View file

@ -478,7 +478,7 @@ def document_main(request, name, rev=None):
content = get_document_content(filename, pathname, split=False, markup=True)
ballot_summary = None
if doc.get_state_slug() in ("iesgeval"):
if doc.get_state_slug() in ("iesgeval") and doc.active_ballot():
ballot_summary = needed_ballot_positions(doc, doc.active_ballot().active_ad_positions().values())
table_rows = dict(doc=4, wg=2, iesg=3)