[fix] No internal server error when trying to Google Auth an unregistered user (#1109)

This commit is contained in:
iTitou 2018-03-21 16:14:54 +01:00 committed by Curtis Castrapel
parent 662eaf4933
commit 1e3df62993
1 changed files with 1 additions and 1 deletions

View File

@ -433,7 +433,7 @@ class Google(Resource):
user = user_service.get_by_email(profile['email'])
if not user.active:
if not (user and user.active):
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
return dict(message='The supplied credentials are invalid.'), 403