summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Duraffort <remi.duraffort@linaro.org>2018-11-26 11:16:29 +0100
committerNeil Williams <neil.williams@linaro.org>2018-11-26 10:35:56 +0000
commitb1e55f1aca9c78f7a406393d084624bd4989d5c1 (patch)
tree8eecc40f87e67df98f1c7a4aa1a2874f1f9d848d
parent663743ffcf1f86329a67635b2d97785dcae12240 (diff)
Fix deprecation warningHEADmaster
""" RemovedInDjango20Warning: Using user.is_authenticated() and user.is_anonymous() as a method is deprecated. Remove the parentheses to use it as an attribute. """ See https://docs.djangoproject.com/en/1.11/ref/contrib/auth/#attributes Change-Id: I3832e40ecaa650ea625c5a1fb8eac1d25e25aaff
-rw-r--r--django_restricted_resource/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django_restricted_resource/utils.py b/django_restricted_resource/utils.py
index 482e3fd..06175ce 100644
--- a/django_restricted_resource/utils.py
+++ b/django_restricted_resource/utils.py
@@ -24,5 +24,5 @@ def filter_bogus_users(user):
If the user is `None' then he's not trusted, period, no need to
check deeper.
"""
- if user is not None and user.is_authenticated() and user.is_active:
+ if user is not None and user.is_authenticated and user.is_active:
return user