Skip to content
Snippets Groups Projects
Commit 443ff97d authored by Christian Dresen's avatar Christian Dresen
Browse files

[WarpPay] Added Stock Count

parent e2408349
No related branches found
No related tags found
No related merge requests found
...@@ -150,6 +150,9 @@ def transaction(request, user_id=None): ...@@ -150,6 +150,9 @@ def transaction(request, user_id=None):
t.amount = product.price_vk t.amount = product.price_vk
if not t.cash_paid: if not t.cash_paid:
u.credit -= t.amount u.credit -= t.amount
product.stock_count -= 1
product.save()
except: except:
return Response(status=status.HTTP_406_NOT_ACCEPTABLE) return Response(status=status.HTTP_406_NOT_ACCEPTABLE)
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment