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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue