From 1e3df62993c96fb15ca171907016e39a07be7214 Mon Sep 17 00:00:00 2001 From: iTitou Date: Wed, 21 Mar 2018 16:14:54 +0100 Subject: [PATCH] [fix] No internal server error when trying to Google Auth an unregistered user (#1109) --- lemur/auth/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemur/auth/views.py b/lemur/auth/views.py index ce38d5d8..60f4e246 100644 --- a/lemur/auth/views.py +++ b/lemur/auth/views.py @@ -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