[fix] No internal server error when trying to Google Auth an unregistered user (#1109)
This commit is contained in:
parent
662eaf4933
commit
1e3df62993
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user