From d19fcf85eb4eb05e7cf61008869c02893bf0a0c4 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 12 Jan 2022 06:24:05 +0200 Subject: [PATCH] bb --- files/routes/admin.py | 2 +- files/routes/users.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 949e1535f..33f301659 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -207,7 +207,7 @@ def monthly(v): emails = [x['email'] for x in requests.get(f'https://api.gumroad.com/v2/products/{GUMROAD_ID}/subscribers', data=data, timeout=5).json()["subscribers"]] - for u in g.db.query(User).filter(User.patron).all(): + for u in g.db.query(User).filter(User.patron > 0).all(): if u.patron == 5 or u.email and u.email.lower() in emails or u.id == 1379: if u.patron == 1: procoins = 2500 elif u.patron == 2: procoins = 5000 diff --git a/files/routes/users.py b/files/routes/users.py index 39a04762a..b6017a776 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -190,7 +190,7 @@ def steal(v): @app.get("/rentoids") @auth_required def rentoids(v): - users = g.db.query(User).filter(User.rent_utc).all() + users = g.db.query(User).filter(User.rent_utc > 0).all() if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' return render_template(f"{template}rentoids.html", v=v, users=users) @@ -199,9 +199,9 @@ def rentoids(v): @app.get("/thiefs") @auth_required def thiefs(v): - successful = g.db.query(User).filter(User.steal_utc).all() - failed = g.db.query(User).filter(User.fail_utc).all() - failed2 = g.db.query(User).filter(User.fail2_utc).all() + successful = g.db.query(User).filter(User.steal_utc > 0).all() + failed = g.db.query(User).filter(User.fail_utc > 0).all() + failed2 = g.db.query(User).filter(User.fail2_utc > 0).all() if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' return render_template(f"{template}thiefs.html", v=v, successful=successful, failed=failed, failed2=failed2)