This commit is contained in:
Aevann1 2022-03-04 23:23:33 +02:00
parent 759c0c8cce
commit 14c568dd3d
2 changed files with 12 additions and 4 deletions

View file

@ -88,12 +88,16 @@ class Submission(Base):
@property
@lazy
def options(self):
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOPOLLER_ID, level=1)
li = g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOPOLLER_ID, level=1)
return sorted(li, key=lambda x: x.id)
@property
@lazy
def choices(self):
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOCHOICE_ID, level=1)
li = g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOCHOICE_ID, level=1)
return sorted(li, key=lambda x: x.id)
@property
@lazy