Fixed an issue with user.is_authenticated being used as a method rather than a property.

- Legacy-Id: 15212
This commit is contained in:
Henrik Levkowetz 2018-06-04 16:53:30 +00:00
parent ad34a88b31
commit adb47d595a

View file

@ -611,7 +611,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.is_authenticated:
if require_consent:
messages.warning(request, mark_safe("""