This commit is contained in:
Aevann1 2022-03-04 23:26:35 +02:00
parent 14c568dd3d
commit 8e56aae79d

View file

@ -88,15 +88,13 @@ class Submission(Base):
@property
@lazy
def options(self):
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)
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOPOLLER_ID, level=1).order_by(Comment.id)
@property
@lazy
def choices(self):
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)
return g.db.query(Comment).filter_by(parent_submission = self.id, author_id = AUTOCHOICE_ID, level=1).order_by(Comment.id)
@property