FIxed cache bork issue
This commit is contained in:
parent
4295ff39e0
commit
3862f7b5fc
4
ext.py
4
ext.py
|
@ -188,7 +188,7 @@ class OrderManager:
|
||||||
for o in data['results']:
|
for o in data['results']:
|
||||||
o = Order(o)
|
o = Order(o)
|
||||||
if o.status in ['canceled', 'expired']:
|
if o.status in ['canceled', 'expired']:
|
||||||
self.remove_cache(order)
|
self.remove_cache(o.code)
|
||||||
else:
|
else:
|
||||||
self.add_cache(Order(o))
|
self.add_cache(Order(o))
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ class OrderManager:
|
||||||
|
|
||||||
order = Order(res)
|
order = Order(res)
|
||||||
if order.status in ['canceled', 'expired']:
|
if order.status in ['canceled', 'expired']:
|
||||||
self.remove_cache(order)
|
self.remove_cache(order.code)
|
||||||
if request:
|
if request:
|
||||||
raise exceptions.Forbidden(f"Your order has been deleted. Contact support with your order identifier ({res['code']}) for further info.")
|
raise exceptions.Forbidden(f"Your order has been deleted. Contact support with your order identifier ({res['code']}) for further info.")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue