dj2: is_anonymous is now an attribute (#37317)
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
c59b4b9e86
commit
52ff4d1bb4
|
@ -56,7 +56,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:
|
||||
# /manage/ is open to anyone authorized to view or edit an agenda.
|
||||
group_ids = [x.id for x in user.groups.all()]
|
||||
if Agenda.objects.filter(Q(view_role_id__in=group_ids) | Q(edit_role_id__in=group_ids)).exists():
|
||||
|
|
Loading…
Reference in New Issue