From 5d714469a1f7b243241f434e9df388fb24746524 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Sun, 17 Aug 2014 10:07:21 +0000 Subject: [PATCH] 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 --- ietf/doc/mails.py | 4 ++-- ietf/doc/views_conflict_review.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ietf/doc/mails.py b/ietf/doc/mails.py index bbe639c2b..5b7cbf340 100644 --- a/ietf/doc/mails.py +++ b/ietf/doc/mails.py @@ -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 diff --git a/ietf/doc/views_conflict_review.py b/ietf/doc/views_conflict_review.py index 5bfccdde0..9aec978c4 100644 --- a/ietf/doc/views_conflict_review.py +++ b/ietf/doc/views_conflict_review.py @@ -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