From 0d3330ae0e379347c256a114781131546f12c290 Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Sun, 27 Nov 2022 12:17:55 -0700 Subject: [PATCH] Transform old cart --- src/storefront/cart.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/storefront/cart.py b/src/storefront/cart.py index d0e87c1..4f72b81 100644 --- a/src/storefront/cart.py +++ b/src/storefront/cart.py @@ -134,6 +134,10 @@ class Cart: } def deserialize(self, data): + # Transform old cart + if type(data) is list: + return + try: self.coupon = Coupon.objects.get(code=data.get('coupon_code')) except Coupon.DoesNotExist: