forked from MarseyWorld/MarseyWorld
8===============D
parent
7fdf0ad348
commit
ea5d69c561
|
@ -202,10 +202,7 @@ class User(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def ban_reason_link(self):
|
def ban_reason_link(self):
|
||||||
if not self.ban_reason:
|
if self.ban_reason and (self.ban_reason.startswith("/post/") or self.ban_reason.startswith("/comment/")):
|
||||||
return self.ban_reason
|
|
||||||
|
|
||||||
if self.ban_reason.startswith("/post/") or self.ban_reason.startswith("/comment/"):
|
|
||||||
return self.ban_reason.split(" ", 1)[0]
|
return self.ban_reason.split(" ", 1)[0]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue