Skip to content

Commit

Permalink
Convert shipping_total and tax_total to strings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joshcartme committed Feb 27, 2014
1 parent 0292635 commit 628bd20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cartridge/shop/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 628bd20

Please sign in to comment.