Django 1.10: User.is_authenticated is now a property

This commit is contained in:
Raphael Michel
2016-09-27 10:25:20 +02:00
parent fbd1c0d367
commit 3e318d0dcf
6 changed files with 11 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ def event_permission_required(permission):
"""
def decorator(function):
def wrapper(request, *args, **kw):
if not request.user.is_authenticated(): # NOQA
if not request.user.is_authenticated: # NOQA
# just a double check, should not ever happen
raise PermissionDenied()
try:
@@ -55,7 +55,7 @@ def organizer_permission_required(permission):
"""
def decorator(function):
def wrapper(request, *args, **kw):
if not request.user.is_authenticated(): # NOQA
if not request.user.is_authenticated: # NOQA
# just a double check, should not ever happen
raise PermissionDenied()
try: