From 9fe98c88e5085e8bb3ddb5a4c24608731122bf39 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Tue, 17 Apr 2012 16:01:45 +0000 Subject: [PATCH] Don't show ballot writeup unless we've got a ballot - Legacy-Id: 4283 --- ietf/idrfc/views_doc.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ietf/idrfc/views_doc.py b/ietf/idrfc/views_doc.py index 762ec3c62..95981f173 100644 --- a/ietf/idrfc/views_doc.py +++ b/ietf/idrfc/views_doc.py @@ -224,10 +224,11 @@ def document_writeup(request, name): e.text if e else "", urlreverse("ietf.wgcharter.views.announcement_text", kwargs=dict(name=doc.name, ann="action")))) - e = doc.latest_event(WriteupDocEvent, type="changed_ballot_writeup_text") - writeups.append(("Ballot Announcement", - e.text if e else "", - urlreverse("ietf.wgcharter.views.ballot_writeupnotes", kwargs=dict(name=doc.name)))) + if doc.latest_event(BallotDocEvent, type="created_ballot"): + e = doc.latest_event(WriteupDocEvent, type="changed_ballot_writeup_text") + writeups.append(("Ballot Announcement", + e.text if e else "", + urlreverse("ietf.wgcharter.views.ballot_writeupnotes", kwargs=dict(name=doc.name)))) if not writeups: raise Http404()