misc: is_anonymous is yet an attibute (#36608)

RemovedInDjango20Warning: Using user.is_authenticated() and user.is_anonymous() as a method is deprecated.
Remove the parentheses to use it as an attribute.
This commit is contained in:
Lauréline Guérin 2019-10-02 13:43:41 +02:00
parent e99384eee3
commit c23a665387
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ def manager_required(function=None, login_url=None):
def check_manager(user):
if user and user.is_staff:
return True
if user and not user.is_anonymous():
if user and not user.is_anonymous:
raise PermissionDenied()
# As the last resort, show the login form
return False