forked from MarseyWorld/MarseyWorld
fix 500 error for /settings/kofi
parent
8cd30889ff
commit
8ffd87508c
|
@ -1416,7 +1416,7 @@ def settings_kofi(v):
|
||||||
if not (v.email and v.is_activated):
|
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
|
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:
|
if not transaction:
|
||||||
return {"error": "Email not found"}, 404
|
return {"error": "Email not found"}, 404
|
||||||
|
|
Loading…
Reference in New Issue