From 628bd203f39a62d9de2613de7057e6742657111f Mon Sep 17 00:00:00 2001 From: joshcartme Date: Thu, 27 Feb 2014 15:48:59 -0800 Subject: [PATCH] Convert shipping_total and tax_total to strings As of Django 1.6 Decimal's cannot be stored in sessions. Convert shipping_total and tax_total to strings before storing in the session. --- cartridge/shop/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cartridge/shop/utils.py b/cartridge/shop/utils.py index b4960be75..580939b5f 100644 --- a/cartridge/shop/utils.py +++ b/cartridge/shop/utils.py @@ -110,7 +110,7 @@ def set_shipping(request, shipping_type, shipping_total): """ from future.builtins import str request.session["shipping_type"] = str(shipping_type) - request.session["shipping_total"] = shipping_total + request.session["shipping_total"] = str(shipping_total) def set_tax(request, tax_type, tax_total): @@ -119,7 +119,7 @@ def set_tax(request, tax_type, tax_total): """ from future.builtins import str request.session["tax_type"] = str(tax_type) - request.session["tax_total"] = tax_total + request.session["tax_total"] = str(tax_total) def sign(value):