diff --git a/django/didgeridoo/webshop/views.py b/django/didgeridoo/webshop/views.py index 0c03ec8..9d5d08a 100644 --- a/django/didgeridoo/webshop/views.py +++ b/django/didgeridoo/webshop/views.py @@ -397,11 +397,13 @@ def checkout(request): order = Order.objects.create(user=request.user, status=orderstatus) for position in cart_positions: + article = Article.objects.get(pk=position.article.id) OrderPosition.objects.create( article=position.article, order=order, amount=position.amount, - price_in_chf=position.article.price_in_chf + price_in_chf=article.price_in_chf * Decimal.from_float( + position.amount) ) return HttpResponseRedirect('/order/%s/' % order.id)