rename fullnames
Handle a couple places with `t3_` that persisted from code movement. on master after time of branch. Then, fix commenting, which used inaccurate fullname parsing logic.
This commit is contained in:
parent
db1f578f26
commit
8191d5a4cf
12 changed files with 27 additions and 28 deletions
|
@ -139,7 +139,7 @@ class Comment(CreatedBase):
|
|||
@property
|
||||
@lazy
|
||||
def fullname(self):
|
||||
return f"t3_{self.id}"
|
||||
return f"comment_{self.id}"
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
@ -151,8 +151,8 @@ class Comment(CreatedBase):
|
|||
@property
|
||||
@lazy
|
||||
def parent_fullname(self):
|
||||
if self.parent_comment_id: return f"t3_{self.parent_comment_id}"
|
||||
elif self.parent_submission: return f"t2_{self.parent_submission}"
|
||||
if self.parent_comment_id: return f"comment_{self.parent_comment_id}"
|
||||
elif self.parent_submission: return f"post_{self.parent_submission}"
|
||||
|
||||
def replies(self, user):
|
||||
if self.replies2 != None: return [x for x in self.replies2 if not x.author.shadowbanned]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue