Fixed issue where session via request wouldn't work.
This commit is contained in:
parent
a1aca73527
commit
d6c19862de
8
ext.py
8
ext.py
|
@ -11,7 +11,7 @@ from time import time
|
||||||
class Order:
|
class Order:
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
|
|
||||||
self.time = time
|
self.time = time()
|
||||||
self.data = data
|
self.data = data
|
||||||
self.status = {'n': 'pending', 'p': 'paid', 'e': 'expired', 'c': 'canceled'}[self.data['status']]
|
self.status = {'n': 'pending', 'p': 'paid', 'e': 'expired', 'c': 'canceled'}[self.data['status']]
|
||||||
self.code = data['code']
|
self.code = data['code']
|
||||||
|
@ -198,9 +198,9 @@ class OrderManager:
|
||||||
if res.status_code != 200:
|
if res.status_code != 200:
|
||||||
if request:
|
if request:
|
||||||
raise exceptions.Forbidden("Your session has expired due to order deletion or change! Please check your E-Mail for more info.")
|
raise exceptions.Forbidden("Your session has expired due to order deletion or change! Please check your E-Mail for more info.")
|
||||||
else:
|
else:
|
||||||
self.remove_cache(code)
|
self.remove_cache(code)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
res = res.json()
|
res = res.json()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue