FIxed cache bork issue

This commit is contained in:
Ed 2023-05-08 22:23:27 +02:00
parent 4295ff39e0
commit 3862f7b5fc
1 changed files with 2 additions and 2 deletions

4
ext.py
View File

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