X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/75957f735219259d3b4bc361f80ccd3d7b92a0e9..fc0b706f8c7eb67531df0a2acd972412e47c7010:/src/wolnelektury/views.py?ds=sidebyside diff --git a/src/wolnelektury/views.py b/src/wolnelektury/views.py index e77045527..2736acc5c 100644 --- a/src/wolnelektury/views.py +++ b/src/wolnelektury/views.py @@ -66,7 +66,7 @@ class LoginFormView(AjaxableFormView): ajax_redirect = True def __call__(self, request): - if request.user.is_authenticated(): + if request.user.is_authenticated: return self.redirect_or_refresh( request, '/', message=_('Already logged in as user %(user)s', ) % {'user': request.user.username}) @@ -87,7 +87,7 @@ class RegisterFormView(AjaxableFormView): honeypot = True def __call__(self, request): - if request.user.is_authenticated(): + if request.user.is_authenticated: return self.redirect_or_refresh( request, '/', message=_('Already logged in as user %(user)s', ) % {'user': request.user.username})