Skip to content

Commit 0347b0d

Browse files
Fix: coupon sticks after order is completed
1 parent 6ebd9c6 commit 0347b0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cart/cart.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def clear(self):
110110
Clear all items from the cart by removing it from the session.
111111
"""
112112
del self.session[settings.CART_SESSION_ID]
113+
del self.coupon_id
113114
self.save()
114115

115116
@property
@@ -127,7 +128,7 @@ def coupon(self):
127128

128129
except Coupon.DoesNotExist:
129130
pass
130-
return None
131+
return None
131132

132133
def get_discount(self):
133134
"""

0 commit comments

Comments
 (0)