Fix potential NPE

This commit is contained in:
Joseph Schorr 2015-07-24 12:09:25 -04:00
parent 52d833b3c6
commit 5d243bb45f

View file

@ -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: