From d6c19862debbb61521fc15e4e6b72e5450a40176 Mon Sep 17 00:00:00 2001 From: Ed Date: Tue, 17 Jan 2023 22:49:39 +0100 Subject: [PATCH] Fixed issue where session via request wouldn't work. --- ext.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext.py b/ext.py index 0439311..333f250 100644 --- a/ext.py +++ b/ext.py @@ -11,7 +11,7 @@ from time import time class Order: def __init__(self, data): - self.time = time + self.time = time() self.data = data self.status = {'n': 'pending', 'p': 'paid', 'e': 'expired', 'c': 'canceled'}[self.data['status']] self.code = data['code'] @@ -198,10 +198,10 @@ class OrderManager: if res.status_code != 200: if request: raise exceptions.Forbidden("Your session has expired due to order deletion or change! Please check your E-Mail for more info.") - else: - self.remove_cache(code) - return None - + else: + self.remove_cache(code) + return None + res = res.json() if res['status'] in ['c', 'e']: