There was an error while loading. Please reload this page.
1 parent 9eefb20 commit b428218Copy full SHA for b428218
1 file changed
ietf/idtracker/models.py
@@ -715,10 +715,11 @@ class IDAuthor(models.Model):
715
def __str__(self):
716
return "%s authors %s" % ( self.person, self.document.filename )
717
def email(self):
718
- try:
719
- return self.person.emailaddress_set.filter(type='I-D').get(priority=self.document_id).address
720
- except EmailAddress.DoesNotExist:
721
- return None
+ addresses = self.person.emailaddress_set.filter(type='I-D',priority=self.document_id)
+ if len(addresses) == 0:
+ return None
+ else:
722
+ return addresses[0].address
723
def final_author_order(self):
724
# Unfortunately, multiple authors for the same draft can have
725
# the same value for author_order (although they should not).
0 commit comments