This commit is contained in:
Aevann1 2022-01-06 22:30:08 +02:00
parent d1ce237f19
commit fbbfc65315
3 changed files with 9 additions and 4 deletions

View file

@ -66,6 +66,11 @@ class Submission(Base):
def __repr__(self):
return f"<Submission(id={self.id})>"
@property
@lazy
def comments(self):
return g.db.query(Comment.author_id, Comment.created_utc, Comment.id).filter_by(parent_submission=self.id)
@property
@lazy
def controversial(self):