Improved a check for authenticated user.
- Legacy-Id: 16521
This commit is contained in:
parent
b3244242aa
commit
8adae6176d
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue