From 935c97de466e3cf2593bda65330f001afa68f9c4 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Wed, 21 Feb 2018 21:11:52 +0100 Subject: [PATCH] assign the list before the view starts Unassigned variables cause the cart to crash at the first run. --- django/didgeridoo/webshop/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/didgeridoo/webshop/views.py b/django/didgeridoo/webshop/views.py index 4e3e67d..3c72954 100644 --- a/django/didgeridoo/webshop/views.py +++ b/django/didgeridoo/webshop/views.py @@ -220,6 +220,8 @@ def cart(request): totalprice_list = [] total = 0 user_name = request.user + cart_position_list_zip = [] + # here we configure the users Currency: if 'currency' not in request.session: request.session['currency'] = None