aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2022-12-01 20:35:40 +0000
committerzsloan2022-12-01 20:35:40 +0000
commit9388bc00070c1103b3e14fa7ba03b0de7464a025 (patch)
treed36450433b8f0721b2130fae2f5eba57407d25c7
parentc740ae9a3710ee97d35f2a6bc35c2762a182b294 (diff)
downloadgenenetwork2-9388bc00070c1103b3e14fa7ba03b0de7464a025.tar.gz
Prevent error when user account doesn't have an email address (which is currently the case if you use Github or ORCID to log-in)
-rw-r--r--wqflask/wqflask/user_session.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/wqflask/user_session.py b/wqflask/wqflask/user_session.py
index 1ed5b802..39b2aec1 100644
--- a/wqflask/wqflask/user_session.py
+++ b/wqflask/wqflask/user_session.py
@@ -150,7 +150,7 @@ class UserSession:
def user_email(self):
"""Shortcut to the user email address"""
- if self.logged_in:
+ if self.logged_in and 'email_address' in self.user_details:
return self.user_details['email_address']
else:
return None