Skip to content

Commit

Permalink
Bugfix with duplicated Favourite objects
Browse files Browse the repository at this point in the history
  • Loading branch information
DEENUU1 committed Dec 15, 2023
1 parent 8c66343 commit 7bb17dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion favourite/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def list(self, request):
return Response(serializer.data, status=status.HTTP_200_OK)

def create(self, request):
offer_id = request.data.get('offer_id')
offer_id = request.data.get('offer')
existing_favourite = Favourite.objects.filter(
user=request.user,
offer=offer_id,
Expand Down

0 comments on commit 7bb17dd

Please sign in to comment.