From 8ffd87508c1a70889812dd59b59351ef77b5b0e2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 18 Sep 2022 00:28:07 +0200 Subject: [PATCH] fix 500 error for /settings/kofi --- files/routes/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/users.py b/files/routes/users.py index 8fa49aa94..b175ec83b 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -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