diff --git a/ietf/idrfc/views_doc.py b/ietf/idrfc/views_doc.py index 67b3a245c..1bd5df148 100644 --- a/ietf/idrfc/views_doc.py +++ b/ietf/idrfc/views_doc.py @@ -251,7 +251,7 @@ def document_ballot_content(request, doc, ballot_id, editable=True): raise Http404() deferred = None - if doc.get_state_slug("%s-iesg" % doc.type) == "defer": + if doc.type_id == "draft" and doc.get_state_slug("draft-iesg") == "defer": # FIXME: fragile deferred = doc.latest_event(type="changed_document", desc__startswith="State changed to <b>IESG Evaluation - Defer</b>") diff --git a/ietf/templates/idrfc/document_ballot_content.html b/ietf/templates/idrfc/document_ballot_content.html index 3fa35bf38..919015f04 100644 --- a/ietf/templates/idrfc/document_ballot_content.html +++ b/ietf/templates/idrfc/document_ballot_content.html @@ -7,6 +7,7 @@ <div class="action"><a href="{% url doc_edit_position name=doc.name,ballot_id=ballot.pk %}">Edit position</a></div> {% endif %} +{% if doc.type_id == "draft" %} <div class="action"> {% if deferred %} <a href="{% url doc_undefer_ballot name=doc.name %}">Undefer ballot</a> @@ -15,6 +16,7 @@ <a href="{% url doc_defer_ballot name=doc.name %}">Defer ballot</a> {% endif %} </div> +{% endif %} </div> {% endif %}