forked from MarseyWorld/MarseyWorld
order /banned and /admin/shadowbanned by ban reason
parent
2b3dd62a86
commit
e3fc980984
|
@ -390,7 +390,7 @@ def shadowbanned(v):
|
||||||
.filter(
|
.filter(
|
||||||
User.shadowbanned != None,
|
User.shadowbanned != None,
|
||||||
) \
|
) \
|
||||||
.order_by(User.truescore.desc()).all()
|
.order_by(User.ban_reason).all()
|
||||||
|
|
||||||
return render_template("admin/shadowbanned.html", v=v, users=users)
|
return render_template("admin/shadowbanned.html", v=v, users=users)
|
||||||
|
|
||||||
|
|
|
@ -185,9 +185,7 @@ def banned(v:User):
|
||||||
users = g.db.query(User).filter(
|
users = g.db.query(User).filter(
|
||||||
User.is_banned != None,
|
User.is_banned != None,
|
||||||
or_(User.unban_utc == 0, User.unban_utc > time.time()),
|
or_(User.unban_utc == 0, User.unban_utc > time.time()),
|
||||||
)
|
).order_by(User.ban_reason)
|
||||||
if v.admin_level >= PERMS['VIEW_LAST_ACTIVE']:
|
|
||||||
users = users.order_by(User.truescore.desc())
|
|
||||||
if not v.can_see_shadowbanned:
|
if not v.can_see_shadowbanned:
|
||||||
users = users.filter(User.shadowbanned == None)
|
users = users.filter(User.shadowbanned == None)
|
||||||
users = users.all()
|
users = users.all()
|
||||||
|
|
Loading…
Reference in New Issue