From fc09103fec5e562454f5e3fce1cc871c120684fc Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 27 Oct 2024 23:44:35 +0300 Subject: [PATCH] fix under siege ordering --- files/routes/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 1da249ce3..973de588d 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -299,8 +299,8 @@ def shadowbanned(v): elif sort == "truescore": key = User.truescore.desc() elif sort == "shadowban_reason": - users1 = users.filter(User.shadowban_reason == 'Under Siege').all() - users2 = users.filter(User.shadowban_reason != 'Under Siege').order_by(User.shadowban_reason).all() + users1 = users.filter(User.shadowban_reason.like('Under Siege%')).all() + users2 = users.filter(not_(User.shadowban_reason.like('Under Siege%'))).order_by(User.shadowban_reason).all() users = users1 + users2 users = users[PAGE_SIZE*(page-1):] users = users[:PAGE_SIZE]