Skip to content

Commit 9ff8d77

Browse files
committed
Merged in [10265] from rcross@amsl.com:
Fix IPR notice addresses formatting. - Legacy-Id: 10276 Note: SVN reference [10265] has been migrated to Git commit 68ce2cd
2 parents 6818075 + 68ce2cd commit 9ff8d77

1 file changed

Lines changed: 3 additions & 28 deletions

File tree

ietf/ipr/views.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,15 @@ def get_document_emails(ipr):
6969
doc_info = 'Internet-Draft entitled "{}" ({})'.format(doc.title,doc.name)
7070
else:
7171
doc_info = 'RFC entitled "{}" (RFC{})'.format(doc.title,get_rfc_num(doc))
72-
73-
# build cc list
74-
if doc.group.acronym == 'none':
75-
if doc.ad and is_draft(doc):
76-
cc_list = doc.ad.role_email('ad').address
77-
else:
78-
role = Role.objects.filter(group__acronym='gen',name='ad')[0]
79-
cc_list = role.email.address
80-
81-
else:
82-
cc_list = get_wg_email_list(doc.group)
8372

84-
(to_list,cc_list) = gather_address_lists('ipr_posted_on_doc',doc=doc)
73+
addrs = gather_address_lists('ipr_posted_on_doc',doc=doc).as_strings(compact=False)
8574
author_names = ', '.join([a.person.name for a in authors])
8675

8776
context = dict(
8877
doc_info=doc_info,
89-
to_email=to_list,
78+
to_email=addrs.to,
9079
to_name=author_names,
91-
cc_email=cc_list,
80+
cc_email=addrs.cc,
9281
ipr=ipr)
9382
text = render_to_string('ipr/posted_document_email.txt',context)
9483
messages.append(text)
@@ -125,20 +114,6 @@ def get_posted_emails(ipr):
125114

126115
return messages
127116

128-
def get_wg_email_list(group):
129-
"""Returns a string of comman separated email addresses for the Area Directors and WG Chairs
130-
"""
131-
result = []
132-
roles = itertools.chain(Role.objects.filter(group=group.parent,name='ad'),
133-
Role.objects.filter(group=group,name='chair'))
134-
for role in roles:
135-
result.append(role.email.address)
136-
137-
if group.list_email:
138-
result.append(group.list_email)
139-
140-
return ', '.join(result)
141-
142117
def set_disclosure_title(disclosure):
143118
"""Set the title of the disclosure"""
144119

0 commit comments

Comments
 (0)