Skip to content

Commit

Permalink
Use current email addresses when we have them when listing document a…
Browse files Browse the repository at this point in the history
…uthors. Fixes #1902. Commit ready for merge.

 - Legacy-Id: 17494
  • Loading branch information
rjsparks committed Mar 21, 2020
1 parent 70a20b3 commit 8583a0a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ietf/doc/models.py
Expand Up @@ -377,7 +377,14 @@ def rfcnum(self):
return self.rfc_number()

def author_list(self):
return ", ".join(author.email_id for author in self.documentauthor_set.all() if author.email_id)
best_addresses = []
for author in self.documentauthor_set.all():
if author.email:
if author.email.active:
best_addresses.append(author.email.address)
else:
best_addresses.append(author.email.person.email_address())
return ", ".join(best_addresses)

def authors(self):
return [ a.person for a in self.documentauthor_set.all() ]
Expand Down

0 comments on commit 8583a0a

Please sign in to comment.