From e0d602bd1b223e3cc5c61fa07bfdee88d52c0ed4 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Mar 2022 23:26:35 +0200 Subject: [PATCH] deviants --- files/classes/submission.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/files/classes/submission.py b/files/classes/submission.py index 10214a80a..9e81d2650 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -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