Skip to content

Commit fc22a66

Browse files
committed
Fixed a crash for the case where we're looking at a historic charter page and there's no active ballot for the histoic charter.
- Legacy-Id: 4804
1 parent 7c78ed8 commit fc22a66

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/idrfc/views_doc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ def document_main(request, name, rev=None):
143143

144144
ballot_summary = None
145145
if doc.get_state_slug() in ("intrev", "iesgrev"):
146-
ballot_summary = needed_ballot_positions(doc, doc.active_ballot().active_ad_positions().values())
146+
active_ballot = doc.active_ballot()
147+
if active_ballot:
148+
ballot_summary = needed_ballot_positions(doc, active_ballot.active_ad_positions().values())
149+
else:
150+
ballot_summary = "No active ballot found."
147151

148152
return render_to_response("idrfc/document_charter.html",
149153
dict(doc=doc,

0 commit comments

Comments
 (0)