Skip to content

Commit

Permalink
Fix/71/item update (#79)
Browse files Browse the repository at this point in the history
* #71 fix : modify item update api's input serializer

* #71 fix : modify item pk to item no
  • Loading branch information
0321minji authored Aug 15, 2024
1 parent 1875370 commit 4a9127c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lands/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def put(self, request):
item = get_object_or_404(Item, no=location_data['no'])
user_emails = item.users.values_list('email', flat=True)
if request.user.email not in user_emails:
raise PermissionDenied(f"You do not have permission to update the location of item {item.id}.")
raise PermissionDenied(f"You do not have permission to update the location of item {item.no}.")

# 기존 위치 정보를 가져오거나 생성합니다.
location, created = Location.objects.get_or_create(item=item,land=request.user.lands)
Expand Down

0 comments on commit 4a9127c

Please sign in to comment.