Transform old cart

This commit is contained in:
Nathan Chapman 2022-11-27 12:17:55 -07:00
parent 8c276793ec
commit 0d3330ae0e

View File

@ -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: