Logic error in checking for DJ user.
This commit is contained in:
parent
068e9e05a8
commit
c32c3ed214
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ class IsAdminOwnerOrReadOnly(permissions.BasePermission):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
return (request.user.is_staff or
|
return ((request.user.is_staff or
|
||||||
request.user == obj.user and
|
request.user == obj.user) and
|
||||||
not request.user.is_dj)
|
not request.user.is_dj)
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue