Skip to content

Commit 906484a

Browse files
committed
We cannot currently assume that BallotInfo entries matching IDInternal.ballot exists. It seems ballot may be set to a value before the actual ballot entry is created, possibly by some old secretariat tool. Very broken, but we need to survive it :-(
- Legacy-Id: 3095
1 parent 46e169d commit 906484a

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

ietf/submit/utils.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,13 @@ def announce_new_version(submission, draft, state_change_msg):
112112
to_email.append(draft.idinternal.state_change_notice_to)
113113
if draft.idinternal.job_owner:
114114
to_email.append(draft.idinternal.job_owner.person.email()[1])
115-
if draft.idinternal.ballot:
116-
for p in draft.idinternal.ballot.positions.all():
117-
if p.discuss == 1 and p.ad.user_level == IESGLogin.AD_LEVEL:
118-
to_email.append(p.ad.person.email()[1])
115+
try:
116+
if draft.idinternal.ballot:
117+
for p in draft.idinternal.ballot.positions.all():
118+
if p.discuss == 1 and p.ad.user_level == IESGLogin.AD_LEVEL:
119+
to_email.append(p.ad.person.email()[1])
120+
except BallotInfo.DoesNotExist:
121+
pass
119122
subject = 'New Version Notification - %s-%s.txt' % (submission.filename, submission.revision)
120123
from_email = settings.IDSUBMIT_ANNOUNCE_FROM_EMAIL
121124
send_mail(None, to_email, from_email, subject, 'submit/announce_new_version.txt',

0 commit comments

Comments
 (0)