Skip to content

Commit 9467d53

Browse files
committed
Fix to-logic in generation of approval mail via RFC Editor
- Legacy-Id: 3915
1 parent cf394bf commit 9467d53

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

ietf/idrfc/mails.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -352,22 +352,19 @@ def generate_approval_mail_rfc_editorREDESIGN(request, doc):
352352
doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet Draft"
353353

354354
to = []
355-
if doc.group:
355+
if doc.group.type_id != "individ":
356356
for r in doc.group.role_set.filter(name="chair").select_related():
357357
to.append(r.formatted_email())
358358

359-
if doc.stream_id == "ise":
360-
# include ISE chair
361-
g = Group.objects.get(type='individ')
362-
for r in g.role_set.filter(name="chair").select_related():
363-
to.append(r.formatted_email())
364-
elif doc.stream_id == "irtf":
365-
# include IRTF chair
366-
g = Group.objects.get(acronym='irtf')
367-
for r in g.role_set.filter(name="chair").select_related():
368-
to.append(r.formatted_email())
369-
# and IRSG
370-
to.append('"Internet Research Steering Group" <irsg@irtf.org>')
359+
if doc.stream_id in ("ise", "irtf"):
360+
# include ISE/IRTF chairs
361+
g = Group.objects.get(acronym=doc.stream_id)
362+
for r in g.role_set.filter(name="chair").select_related():
363+
to.append(r.formatted_email())
364+
365+
if doc.stream_id == "irtf":
366+
# include IRSG
367+
to.append('"Internet Research Steering Group" <irsg@irtf.org>')
371368

372369
return render_to_string("idrfc/approval_mail_rfc_editor.txt",
373370
dict(doc=doc,

0 commit comments

Comments
 (0)