SQLA migration: fix RemovedIn20Warnings

This commit is contained in:
justcool393 2023-02-18 22:19:10 -06:00 committed by Ben Rog-Wilhelm
parent 449e2557d0
commit ff09ba4209
4 changed files with 11 additions and 15 deletions

View file

@ -194,12 +194,9 @@ class Comment(Base):
@property
@lazy
def parent(self):
if not self.parent_submission: return None
if self.level == 1: return self.post
else: return g.db.query(Comment).get(self.parent_comment_id)
else: return g.db.get(Comment, self.parent_comment_id)
@property
@lazy