From 8adae6176d35cb38b280a67e0e403ed65f6ee393 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 18 Jul 2019 19:30:01 +0000 Subject: [PATCH] Improved a check for authenticated user. - Legacy-Id: 16521 --- ietf/ietfauth/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/ietfauth/views.py b/ietf/ietfauth/views.py index 04359f88a..859c9cedb 100644 --- a/ietf/ietfauth/views.py +++ b/ietf/ietfauth/views.py @@ -623,7 +623,7 @@ def login(request, extra_context=None): "to set a new password for your account.", } response = LoginView.as_view(extra_context=extra_context)(request) - if isinstance(response, HttpResponseRedirect) and user.is_authenticated: + if isinstance(response, HttpResponseRedirect) and user and user.is_authenticated: try: user.person except Person.DoesNotExist: