From 8186a9fbc7ca4f2f51991a53842089cb046f0474 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 3 Feb 2024 01:15:04 +0200 Subject: [PATCH] consistency --- files/classes/user.py | 4 ++-- files/templates/admin/shadowbanned_tooltip.html | 2 +- files/templates/userpage/admintools.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 2cc430dad..6a7228eb5 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -1256,8 +1256,8 @@ class User(Base): @property @lazy - def shadowbanner(self): - return g.db.query(User.username).filter_by(id=self.shadowbanned).one()[0] + def shadowbanned_by(self): + return '@' + g.db.query(User.username).filter_by(id=self.shadowbanned).one()[0] @property @lazy diff --git a/files/templates/admin/shadowbanned_tooltip.html b/files/templates/admin/shadowbanned_tooltip.html index 105dfd528..55666fe02 100644 --- a/files/templates/admin/shadowbanned_tooltip.html +++ b/files/templates/admin/shadowbanned_tooltip.html @@ -1,3 +1,3 @@ {% if user.shadowbanned and v and v.admin_level >= PERMS['USER_SHADOWBAN'] %} - + {% endif %} diff --git a/files/templates/userpage/admintools.html b/files/templates/userpage/admintools.html index afee1121c..b4627204e 100644 --- a/files/templates/userpage/admintools.html +++ b/files/templates/userpage/admintools.html @@ -25,7 +25,7 @@
SHADOWBANNED USER: {{u.ban_reason | safe}} - (by @{{u.shadowbanner}}) + (by {{u.shadowbanned_by}})
{% endif %} {% endmacro %}