From 9f89e8a0aa512ae7a5f5393ead766a647b54e33c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 19 Apr 2022 21:14:09 +0200 Subject: [PATCH] fsd --- files/routes/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index 204877521..e24b5db52 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -391,12 +391,12 @@ def gumroad(v): tier = tiers[response["variants_and_quantity"]] if v.patron == tier: return {"error": f"{patron} rewards already claimed"}, 400 - existing = g.db.query(User.id).filter(User.email == v.email, User.is_activated == True, User.patron >= tier).one_or_none() - if existing: return {"error": f"{patron} rewards already claimed on another account"}, 400 - procoins = procoins_li[tier] - procoins_li[v.patron] if procoins < 0: return {"error": f"{patron} rewards already claimed"}, 400 + existing = g.db.query(User.id).filter(User.email == v.email, User.is_activated == True, User.patron >= tier).one_or_none() + if existing: return {"error": f"{patron} rewards already claimed on another account"}, 400 + v.patron = tier if v.discord_id: add_role(v, f"{tier}")