Small fix on counters

This commit is contained in:
Skia 2016-07-16 16:48:56 +02:00
parent f600e174b1
commit 4498877283

View File

@ -154,7 +154,8 @@ class CounterClick(DetailView):
def add_product(self, request, q = 1, p=None):
""" Add a product to the basket """
pid = p or str(request.POST['product_id'])
pid = p or request.POST['product_id']
pid = str(pid)
price = self.get_price(pid)
total = self.sum_basket(request)
if self.customer.amount < (total + q*float(price)):