Fixed another place where None author email needed an extra guard.

- Legacy-Id: 13573
This commit is contained in:
Henrik Levkowetz 2017-06-09 20:07:55 +00:00
parent 131a7020b5
commit 22d83d2d2c

View file

@ -65,7 +65,7 @@ def get_draft_authors_emails(draft):
" Get list of authors for the given draft."
# This feels 'correct'; however, it creates fairly large delta
return [author.email.email_address() for author in draft.documentauthor_set.all() if author.email.email_address()]
return [author.email.email_address() for author in draft.documentauthor_set.all() if author.email and author.email.email_address()]
# This gives fairly small delta compared to current state,
# however, it seems to be wrong (doesn't check for emails being