remove unneeded line
This commit is contained in:
parent
1f67035740
commit
55dfa457d2
|
@ -40,7 +40,6 @@ class ProductDetailView(LoginRequiredMixin, FormView):
|
||||||
order = Order.objects.create(user=request.user)
|
order = Order.objects.create(user=request.user)
|
||||||
|
|
||||||
### get product from kwargs
|
### get product from kwargs
|
||||||
product = Product.objects.get(id=
|
|
||||||
if self.product in order.products.all():
|
if self.product in order.products.all():
|
||||||
### this product is already added to this order, increase count by one
|
### this product is already added to this order, increase count by one
|
||||||
OrderProductRelation.objects.filter(product=self.product, order=order).update(quantity=F('quantity') + 1)
|
OrderProductRelation.objects.filter(product=self.product, order=order).update(quantity=F('quantity') + 1)
|
||||||
|
|
Loading…
Reference in a new issue