fds
This commit is contained in:
parent
d1ce237f19
commit
fbbfc65315
3 changed files with 9 additions and 4 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue