fix under siege ordering

master
Aevann 2024-10-27 23:44:35 +03:00
parent 297f04157f
commit fc09103fec
1 changed files with 2 additions and 2 deletions

View File

@ -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]