Merge pull request #270 from coreos-inc/npefix3

Fix potential NPE
This commit is contained in:
Jimmy Zelinskie 2015-07-24 12:13:56 -04:00
commit 66aaf0e4a2

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: