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:
justcool393 2023-07-13 12:37:28 -07:00 committed by GitHub
parent db1f578f26
commit 8191d5a4cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 27 additions and 28 deletions

View file

@ -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]

View file

@ -164,7 +164,7 @@ class Submission(CreatedBase):
@property
@lazy
def fullname(self):
return f"t2_{self.id}"
return f"post_{self.id}"
@property
@lazy

View file

@ -243,7 +243,7 @@ class User(CreatedBase):
@property
@lazy
def fullname(self):
return f"t1_{self.id}"
return f"user_{self.id}"
@property
@lazy