From c5b118c7c268fe9e3f69f33daf5671ebf9b4e804 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 25 Feb 2018 19:57:50 +0100 Subject: [PATCH] correct the cart creation --- django/didgeridoo/webshop/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/didgeridoo/webshop/views.py b/django/didgeridoo/webshop/views.py index cd9fcda..d8b2d71 100644 --- a/django/didgeridoo/webshop/views.py +++ b/django/didgeridoo/webshop/views.py @@ -98,7 +98,7 @@ def article_details(request, article_id): rate = ExchangeRate article_view = True currency_name = "CHF" - user_id = request.user.id + user = request.user if 'currency' not in request.session: request.session['currency'] = None @@ -127,7 +127,7 @@ def article_details(request, article_id): amount = amount.cleaned_data['amount'] operation = 'add' restrict_cart_to_one_article( - user_id, + user, article_id, amount, operation