From 4498877283b00d6821e0998ca02bb6cb1147eb77 Mon Sep 17 00:00:00 2001 From: Skia Date: Sat, 16 Jul 2016 16:48:56 +0200 Subject: [PATCH] Small fix on counters --- counter/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/counter/views.py b/counter/views.py index e3b28c2b..8d252c63 100644 --- a/counter/views.py +++ b/counter/views.py @@ -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)):