Skip to content

Commit 786fc38

Browse files
committed
Improve the approval mail contents concerning IESG contact members. Fixes ietf-tools#1588. Commit ready for merge.
- Legacy-Id: 8923
1 parent 7e188d2 commit 786fc38

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

ietf/doc/mails.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,15 @@ def generate_approval_mail_approved(request, doc):
189189
else:
190190
made_by = "This document is the product of the %s." % doc.group.name_with_wg
191191

192-
director = doc.ad
193-
other_director = Person.objects.filter(role__group__role__person=director, role__group__role__name="ad").exclude(pk=director.pk)
192+
responsible_directors = set([doc.ad,])
193+
if doc.group.type_id not in ("individ","area"):
194+
responsible_directors.update([x.person for x in Role.objects.filter(group=doc.group.parent,name='ad')])
195+
responsible_directors = [x.plain_name() for x in responsible_directors if x]
194196

195-
if doc.group.type_id not in ("individ", "area") and other_director:
196-
contacts = "The IESG contact persons are %s and %s." % (director.plain_name(), other_director[0].plain_name())
197+
if len(responsible_directors)>1:
198+
contacts = "The IESG contact persons are "+", ".join(responsible_directors[:-1])+" and "+responsible_directors[-1]+"."
197199
else:
198-
contacts = "The IESG contact person is %s." % director.plain_name()
200+
contacts = "The IESG contact person is %s." % responsible_directors[0]
199201

200202
doc_type = "RFC" if doc.get_state_slug() == "rfc" else "Internet Draft"
201203

0 commit comments

Comments
 (0)