Skip to content

Commit

Permalink
update some actions
Browse files Browse the repository at this point in the history
  • Loading branch information
khasanjon-dev committed Nov 21, 2023
1 parent d22af1e commit 88eb01e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/users/views/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def delete_basket(self, request, pk):
serializer = BasketModelSerializer(basket)
if basket.quantity - 1 == 0:
basket.delete()
return Response(status.HTTP_204_NO_CONTENT)
return Response(serializer.data)
basket.quantity -= 1
basket.save()
return Response(serializer.data)
Expand Down

0 comments on commit 88eb01e

Please sign in to comment.