From 5d243bb45f99d1dff0ba5493c31fab8c49dca790 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 24 Jul 2015 12:09:25 -0400 Subject: [PATCH] Fix potential NPE --- endpoints/api/user.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/endpoints/api/user.py b/endpoints/api/user.py index f14df0bc3..cf0cf5794 100644 --- a/endpoints/api/user.py +++ b/endpoints/api/user.py @@ -415,12 +415,12 @@ def conduct_signin(username_or_email, password, invite_code=None): except model.user.TooManyUsersException as ex: raise license_error(exception=ex) - # If there is an attached invitation code, handle it here. This will mark the - # user as verified if the code is valid. - if invite_code: - handle_invite_code(invite_code, found_user) - if found_user: + # If there is an attached invitation code, handle it here. This will mark the + # user as verified if the code is valid. + if invite_code: + handle_invite_code(invite_code, found_user) + if common_login(found_user): return {'success': True} else: