diff --git a/files/classes/comment.py b/files/classes/comment.py index cdc78951e..13702718f 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -233,14 +233,14 @@ class Comment(Base): @property @lazy - def author_name(self): - if self.ghost: return '👻' - else: return self.author.username + def permalink(self): + return f"{SITE_FULL}{self.sl}" @property @lazy - def permalink(self): - return f"{SITE_FULL}/comment/{self.id}?context=8#context" + def author_name(self): + if self.ghost: return '👻' + else: return self.author.username @property @lazy diff --git a/files/classes/submission.py b/files/classes/submission.py index c300524f6..2b58ef144 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -208,15 +208,15 @@ class Submission(Base): @property @lazy def sl(self): - return f'/post/{self.id}' + link = f"/post/{self.id}" + if self.sub: link = f"/s/{self.sub}{link}" + return link @property @lazy def shortlink(self): - link = f"/post/{self.id}" - if self.sub: link = f"/s/{self.sub}{link}" - + link = self.sl if self.club: return link output = self.title.lower()