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:
parent
e99384eee3
commit
c23a665387
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue