Transform old cart
This commit is contained in:
parent
8c276793ec
commit
0d3330ae0e
@ -134,6 +134,10 @@ class Cart:
|
|||||||
}
|
}
|
||||||
|
|
||||||
def deserialize(self, data):
|
def deserialize(self, data):
|
||||||
|
# Transform old cart
|
||||||
|
if type(data) is list:
|
||||||
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.coupon = Coupon.objects.get(code=data.get('coupon_code'))
|
self.coupon = Coupon.objects.get(code=data.get('coupon_code'))
|
||||||
except Coupon.DoesNotExist:
|
except Coupon.DoesNotExist:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user