Merged in [17496] from rjsparks@nostrum.com:

Remove the rest of the log.assertions checking that iesg_state existed in places we expected it to.  Removed unnecessary imports.
 - Legacy-Id: 17522
Note: SVN reference [17496] has been migrated to Git commit db5d11ea32
This commit is contained in:
Henrik Levkowetz 2020-03-23 22:34:03 +00:00
commit 50bb971fc3
4 changed files with 1 additions and 7 deletions

View file

@ -333,7 +333,6 @@ class DocumentInfo(models.Model):
else: else:
return "Replaced" return "Replaced"
elif state.slug == "active": elif state.slug == "active":
log.assertion('iesg_state')
if iesg_state: if iesg_state:
if iesg_state.slug == "dead": if iesg_state.slug == "dead":
# Many drafts in the draft-iesg "Dead" state are not dead # Many drafts in the draft-iesg "Dead" state are not dead

View file

@ -43,7 +43,6 @@ from django.utils.safestring import mark_safe
from ietf.ietfauth.utils import user_is_person, has_role from ietf.ietfauth.utils import user_is_person, has_role
from ietf.doc.models import BallotPositionDocEvent, IESG_BALLOT_ACTIVE_STATES from ietf.doc.models import BallotPositionDocEvent, IESG_BALLOT_ACTIVE_STATES
from ietf.name.models import BallotPositionName from ietf.name.models import BallotPositionName
from ietf.utils import log
register = template.Library() register = template.Library()
@ -168,7 +167,6 @@ def state_age_colored(doc):
# Don't show anything for expired/withdrawn/replaced drafts # Don't show anything for expired/withdrawn/replaced drafts
return "" return ""
iesg_state = doc.get_state_slug('draft-iesg') iesg_state = doc.get_state_slug('draft-iesg')
log.assertion('iesg_state')
if not iesg_state: if not iesg_state:
return "" return ""

View file

@ -78,7 +78,7 @@ from ietf.meeting.utils import group_sessions, get_upcoming_manageable_sessions,
from ietf.review.models import ReviewAssignment from ietf.review.models import ReviewAssignment
from ietf.review.utils import can_request_review_of_doc, review_assignments_to_list_for_docs from ietf.review.utils import can_request_review_of_doc, review_assignments_to_list_for_docs
from ietf.review.utils import no_review_from_teams_on_doc from ietf.review.utils import no_review_from_teams_on_doc
from ietf.utils import markup_txt, log from ietf.utils import markup_txt
from ietf.utils.text import maybe_split from ietf.utils.text import maybe_split
@ -405,7 +405,6 @@ def document_main(request, name, rev=None):
actions.append((label, urlreverse('ietf.doc.views_draft.request_publication', kwargs=dict(name=doc.name)))) actions.append((label, urlreverse('ietf.doc.views_draft.request_publication', kwargs=dict(name=doc.name))))
if doc.get_state_slug() not in ["rfc", "expired"] and doc.stream_id in ("ietf",) and not snapshot: if doc.get_state_slug() not in ["rfc", "expired"] and doc.stream_id in ("ietf",) and not snapshot:
log.assertion('iesg_state')
if iesg_state.slug == 'idexists' and can_edit: if iesg_state.slug == 'idexists' and can_edit:
actions.append(("Begin IESG Processing", urlreverse('ietf.doc.views_draft.edit_info', kwargs=dict(name=doc.name)) + "?new=1")) actions.append(("Begin IESG Processing", urlreverse('ietf.doc.views_draft.edit_info', kwargs=dict(name=doc.name)) + "?new=1"))
elif can_edit_stream_info and (iesg_state.slug in ('idexists','watching')): elif can_edit_stream_info and (iesg_state.slug in ('idexists','watching')):

View file

@ -23,7 +23,6 @@ from ietf.doc.models import IESG_SUBSTATE_TAGS
from ietf.doc.templatetags.ietf_filters import clean_whitespace from ietf.doc.templatetags.ietf_filters import clean_whitespace
from ietf.group.models import Group from ietf.group.models import Group
from ietf.person.models import Person, Email from ietf.person.models import Person, Email
from ietf.utils import log
def all_id_txt(): def all_id_txt():
# this returns a lot of data so try to be efficient # this returns a lot of data so try to be efficient
@ -157,7 +156,6 @@ def all_id2_txt():
# 3 # 3
if state == "active": if state == "active":
s = "I-D Exists" s = "I-D Exists"
log.assertion('iesg_state')
if iesg_state: if iesg_state:
s = iesg_state.name s = iesg_state.name
tags = d.tags.filter(slug__in=IESG_SUBSTATE_TAGS).values_list("name", flat=True) tags = d.tags.filter(slug__in=IESG_SUBSTATE_TAGS).values_list("name", flat=True)