8===============D
This commit is contained in:
parent
f8ecf99c38
commit
77a23ad1d4
1 changed files with 1 additions and 4 deletions
|
@ -202,10 +202,7 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def ban_reason_link(self):
|
||||
if not self.ban_reason:
|
||||
return self.ban_reason
|
||||
|
||||
if self.ban_reason.startswith("/post/") or self.ban_reason.startswith("/comment/"):
|
||||
if self.ban_reason and (self.ban_reason.startswith("/post/") or self.ban_reason.startswith("/comment/")):
|
||||
return self.ban_reason.split(" ", 1)[0]
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue