master
Aevann1 2021-11-24 18:20:57 +02:00
parent f33b3a33b9
commit 071ef274c6
1 changed files with 3 additions and 2 deletions

View File

@ -205,8 +205,9 @@ class User(Base):
@property
@lazy
def ban_reason_link(self):
if self.ban_reason and (self.ban_reason.startswith("/post/") or self.ban_reason.startswith("/comment/")):
return self.ban_reason.split(" ", 1)[0]
if self.ban_reason:
if self.ban_reason.startswith("/post/"): return self.ban_reason.split(" ", 1)[0]
if self.ban_reason.startswith("/comment/")): return self.ban_reason.split(" ", 1)[0] + "?context=9#context"
@property
@lazy