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 68ce2cd299
This commit is contained in:
Henrik Levkowetz 2015-10-23 19:32:44 +00:00
commit 9ff8d77798

View file

@ -69,26 +69,15 @@ def get_document_emails(ipr):
doc_info = 'Internet-Draft entitled "{}" ({})'.format(doc.title,doc.name)
else:
doc_info = 'RFC entitled "{}" (RFC{})'.format(doc.title,get_rfc_num(doc))
# build cc list
if doc.group.acronym == 'none':
if doc.ad and is_draft(doc):
cc_list = doc.ad.role_email('ad').address
else:
role = Role.objects.filter(group__acronym='gen',name='ad')[0]
cc_list = role.email.address
else:
cc_list = get_wg_email_list(doc.group)
(to_list,cc_list) = gather_address_lists('ipr_posted_on_doc',doc=doc)
addrs = gather_address_lists('ipr_posted_on_doc',doc=doc).as_strings(compact=False)
author_names = ', '.join([a.person.name for a in authors])
context = dict(
doc_info=doc_info,
to_email=to_list,
to_email=addrs.to,
to_name=author_names,
cc_email=cc_list,
cc_email=addrs.cc,
ipr=ipr)
text = render_to_string('ipr/posted_document_email.txt',context)
messages.append(text)
@ -125,20 +114,6 @@ def get_posted_emails(ipr):
return messages
def get_wg_email_list(group):
"""Returns a string of comman separated email addresses for the Area Directors and WG Chairs
"""
result = []
roles = itertools.chain(Role.objects.filter(group=group.parent,name='ad'),
Role.objects.filter(group=group,name='chair'))
for role in roles:
result.append(role.email.address)
if group.list_email:
result.append(group.list_email)
return ', '.join(result)
def set_disclosure_title(disclosure):
"""Set the title of the disclosure"""