Use Role.formatted_email a couple of places we actually have the role

rather than use the one on person as the latter is guessing while the
former is not
 - Legacy-Id: 8273
This commit is contained in:
Ole Laursen 2014-08-17 10:07:21 +00:00
parent a1a13323d2
commit 5d714469a1
2 changed files with 3 additions and 3 deletions

View file

@ -32,9 +32,9 @@ def email_stream_changed(request, doc, old_stream, new_stream, text=""):
# These use comprehension to deal with conditions when there might be more than one chair listed for a stream
if old_stream:
to.extend([x.person.formatted_email() for x in Role.objects.filter(group__acronym=old_stream.slug,name='chair')])
to.extend([r.formatted_email() for r in Role.objects.filter(group__acronym=old_stream.slug, name='chair')])
if new_stream:
to.extend([x.person.formatted_email() for x in Role.objects.filter(group__acronym=new_stream.slug,name='chair')])
to.extend([r.formatted_email() for r in Role.objects.filter(group__acronym=new_stream.slug, name='chair')])
if not to:
return

View file

@ -401,7 +401,7 @@ def start_review_sanity_check(request, name):
def build_notify_addresses(doc_to_review):
# Take care to do the right thing during ietf chair and stream owner transitions
notify_addresses = []
notify_addresses.extend([x.person.formatted_email() for x in Role.objects.filter(group__acronym=doc_to_review.stream.slug,name='chair')])
notify_addresses.extend([r.formatted_email() for r in Role.objects.filter(group__acronym=doc_to_review.stream.slug, name='chair')])
notify_addresses.append("%s@%s" % (doc_to_review.name, settings.TOOLS_SERVER))
return notify_addresses