better paypig reward error message when no matching email found

master
Aevann 2023-10-26 20:11:35 +03:00
parent ef3fd55c9e
commit fa756382d1
1 changed files with 4 additions and 1 deletions

View File

@ -1453,8 +1453,11 @@ def settings_claim_rewards(v):
if not (v.email and v.email_verified):
abort(400, f"You must have a verified email to verify {patron} status and claim your rewards!")
transactions = g.db.query(Transaction).filter_by(email=v.email, claimed=None).all()
transactions = g.db.query(Transaction).filter_by(email=v.email).all()
if not transactions:
abort(400, f"No matching email found. Please ensure youre using the same email here that you used on {DONATE_SERVICE}.")
transactions = g.db.query(Transaction).filter_by(email=v.email, claimed=None).all()
if not transactions:
abort(400, f"{patron} rewards already claimed!")