Skip to content

Commit

Permalink
Merge pull request #35 from SheCodesAus/bug-fix/change-permission
Browse files Browse the repository at this point in the history
replace owner with created_by
  • Loading branch information
suanTech committed Apr 2, 2024
2 parents 43fc1c1 + b12d1b7 commit 75eea24
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 75eea24

Please sign in to comment.