fd
This commit is contained in:
parent
54d063d5de
commit
5131e139eb
2 changed files with 3 additions and 0 deletions
|
@ -150,6 +150,8 @@ class Comment(Base, Age_times, Scores, Stndrd, Fuzzing):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def permalink(self):
|
def permalink(self):
|
||||||
|
if self.post and self.post.club: return f"/comment/{self.id}/"
|
||||||
|
|
||||||
if self.post: return f"{self.post.permalink}/{self.id}/"
|
if self.post: return f"{self.post.permalink}/{self.id}/"
|
||||||
else: return f"/comment/{self.id}/"
|
else: return f"/comment/{self.id}/"
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,7 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def permalink(self):
|
def permalink(self):
|
||||||
|
if self.club: return f"/post/{self.id}"
|
||||||
|
|
||||||
output = self.title.lower()
|
output = self.title.lower()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue