From bf7fd8382d65726688ac5d33be6f97432aa513b7 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 5 May 2023 08:01:36 +0300 Subject: [PATCH] order owners desc in /shop/hats --- files/routes/hats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/hats.py b/files/routes/hats.py index 5de87664b..36fe83d5a 100644 --- a/files/routes/hats.py +++ b/files/routes/hats.py @@ -41,9 +41,9 @@ def hats(v:User): hat_count = [x[0] for x in g.db.query(Hat.hat_id).group_by(Hat.hat_id).order_by(func.count(Hat.hat_id).desc()).all()] if SITE == 'rdrama.net': - hats = sorted(hats.all(), key=lambda x: hat_count.index(x[0].id) if x[0].id in hat_count else 0, reverse=True) + hats = sorted(hats.all(), key=lambda x: hat_count.index(x[0].id) if x[0].id in hat_count else 0) else: - hats = sorted(hats.all(), key=lambda x: hat_count.index(x.id) if x.id in hat_count else 0, reverse=True) + hats = sorted(hats.all(), key=lambda x: hat_count.index(x.id) if x.id in hat_count else 0) firstrange = PAGE_SIZE * (page - 1) secondrange = firstrange + PAGE_SIZE