From 514fb320cfa32e34a6e22f483326a3895c204c8f Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 3 May 2023 17:47:06 +0300 Subject: [PATCH] show truescore in admin.patrons and order by it --- files/routes/static.py | 2 +- files/templates/admin/patrons.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/static.py b/files/routes/static.py index e3284e9c5..5aba367ed 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -130,7 +130,7 @@ def daily_chart(v:User): @limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID) @admin_level_required(PERMS['VIEW_PATRONS']) def patrons(v): - users = g.db.query(User).filter(User.patron > 0).order_by(User.patron.desc(), User.id).all() + users = g.db.query(User).filter(User.patron > 0).order_by(User.patron.desc(), User.truescore.desc()).all() return render_template("admin/patrons.html", v=v, users=users, benefactor_def=AWARDS['benefactor']) diff --git a/files/templates/admin/patrons.html b/files/templates/admin/patrons.html index 43b4d5b0b..d4bda2aa3 100644 --- a/files/templates/admin/patrons.html +++ b/files/templates/admin/patrons.html @@ -7,6 +7,7 @@ # Name Tier + Truescore {% for user in users %} @@ -16,6 +17,7 @@ 2{{user.patron}} + {{user.truescore}} {% endfor %}