From a6ce6135d8cc002c867d106cdc7bdc2b84e35988 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 14 Sep 2022 13:00:46 +0200 Subject: [PATCH] fix --- files/routes/static.py | 6 +++--- files/templates/marseys.html | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index b42ab44513..5dfa735d51 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -24,11 +24,11 @@ def marseys(v): if SITE == 'rdrama.net': marseys = g.db.query(Marsey, User).join(User, Marsey.author_id == User.id).filter(Marsey.submitter_id==None) sort = request.values.get("sort", "usage") - if sort == "usage": marseys = marseys.order_by(Marsey.count.desc(), User.username) - else: marseys = marseys.order_by(User.username, Marsey.count.desc()) + if sort == "usage": marseys = marseys.order_by(Marsey.count.desc(), User.username).all() + else: marseys = marseys.order_by(User.username, Marsey.count.desc()).all() original = listdir("/asset_submissions/marseys/original") - for m in marseys: + for marsey in marseys: if f'{marsey.name}.png' in original: marsey.og = f'{marsey.name}.png' elif f'{marsey.name}.webp' in original: diff --git a/files/templates/marseys.html b/files/templates/marseys.html index d079275563..d287603cbb 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -10,7 +10,7 @@ # Name Marsey - Usage + Usage {% if SITE == 'rdrama.net' %} Author Original File @@ -47,6 +47,4 @@ - - {% endblock %} \ No newline at end of file