There was an error while loading. Please reload this page.
1 parent f029c88 commit 801283fCopy full SHA for 801283f
1 file changed
ietf/nomcom/utils.py
@@ -61,9 +61,13 @@ def get_year_by_nomcom(nomcom):
61
62
63
def get_user_email(user):
64
- emails = Email.objects.filter(person__user=user)
65
- mail = emails and emails[0] or None
66
- return mail
+ emails = user.person.email_set.filter(active=True).order_by('-time')
+ if emails:
+ for email in emails:
67
+ if email.address == user.username:
68
+ return email
69
+ return emails[0]
70
+ return None
71
72
73
def is_nomcom_member(user, nomcom):
0 commit comments