Skip to content

Commit

Permalink
replace owner with created_by
Browse files Browse the repository at this point in the history
  • Loading branch information
suanTech committed Apr 2, 2024
1 parent c957c10 commit b12d1b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exception_al/workshops/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ class IsOwnerOrReadOnly(permissions.BasePermission):
def has_object_permission(self, request, view, obj):
if request.method in permissions.SAFE_METHODS:
return True
return obj.owner == request.user
return obj.created_by == request.user

0 comments on commit b12d1b7

Please sign in to comment.