This commit is contained in:
Aevann1 2021-11-24 18:20:57 +02:00
parent b67a8c4f86
commit 6555839c7c

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