fix 500 error for /settings/kofi

master
Aevann1 2022-09-18 00:28:07 +02:00
parent 8cd30889ff
commit 8ffd87508c
1 changed files with 1 additions and 1 deletions

View File

@ -1416,7 +1416,7 @@ def settings_kofi(v):
if not (v.email and v.is_activated):
return {"error": f"You must have a verified email to verify {patron} status and claim your rewards!"}, 400
transaction = g.db.query(Transaction).filter_by(email=v.email).one_or_none()
transaction = g.db.query(Transaction).filter_by(email=v.email).order_by(Transaction.created_utc.desc()).first()
if not transaction:
return {"error": "Email not found"}, 404