Logic error in checking for DJ user.

This commit is contained in:
Josh Washburne 2018-04-06 12:19:51 -04:00
parent 068e9e05a8
commit c32c3ed214

View file

@ -31,8 +31,8 @@ class IsAdminOwnerOrReadOnly(permissions.BasePermission):
return True
else:
if request.user.is_authenticated:
return (request.user.is_staff or
request.user == obj.user and
return ((request.user.is_staff or
request.user == obj.user) and
not request.user.is_dj)
else:
return False