From 85c8af1f74a2fe1a741f57e14ef1857d1c364d55 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Tue, 7 Jul 2015 21:05:41 +0300 Subject: [PATCH] API Hot Fix - #Error On login without email --- SE_API/API.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SE_API/API.py b/SE_API/API.py index 1f79300..340b5f8 100644 --- a/SE_API/API.py +++ b/SE_API/API.py @@ -185,10 +185,11 @@ def oauth(oauth_token): tempName = ";" - if user_data["email"] == "": - for email in userEmails: - if email["primary"] and email["verified"]: - tempEmail = email["email"] + if 'email' in user_data: + if user_data["email"] == "": + for email in userEmails: + if email["primary"] and email["verified"]: + tempEmail = email["email"] else: tempEmail = user_data["email"]