This commit is contained in:
CaringCleaner 2021-11-24 15:33:41 +00:00
parent ae5c3125ee
commit f8ecf99c38
2 changed files with 14 additions and 1 deletions

View file

@ -199,6 +199,15 @@ class User(Base):
def age(self):
return int(time.time()) - self.created_utc
@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/"):
return self.ban_reason.split(" ", 1)[0]
@property
@lazy
def alts_unique(self):