From e3ab0efe3eb5f5d49773d731d0f15289700e0e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 5 Jun 2015 17:05:30 +0200 Subject: [PATCH] allow passing multiple amounts (#7471) --- lingo/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lingo/views.py b/lingo/views.py index 8c1dc69..14b0697 100644 --- a/lingo/views.py +++ b/lingo/views.py @@ -60,7 +60,7 @@ class AddBasketItemApiView(View): request_body = json.loads(self.request.body) item = BasketItem() - item.amount = Decimal(request.GET.get('amount')) + item.amount = sum([Decimal(x) for x in request.GET.getlist('amount')]) try: if request.GET.get('NameId'):