From 98e3e6354734590f3624549aba7d025223186eb8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 14 Jul 2022 16:47:03 +0200 Subject: [PATCH] order poll votes by time of creation --- files/routes/polls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/polls.py b/files/routes/polls.py index 98ff61e77..74c5e9665 100644 --- a/files/routes/polls.py +++ b/files/routes/polls.py @@ -47,7 +47,7 @@ def option_votes(option_id, v): if not option: abort(404) - ups = g.db.query(SubmissionOptionVote).filter_by(option_id=option_id).all() + ups = g.db.query(SubmissionOptionVote).filter_by(option_id=option_id).order_by(SubmissionOptionVote.created_utc).all() return render_template("poll_votes.html", v=v, @@ -97,7 +97,7 @@ def option_votes_comment(option_id, v): if not option: abort(404) - ups = g.db.query(CommentOptionVote).filter_by(option_id=option_id).all() + ups = g.db.query(CommentOptionVote).filter_by(option_id=option_id).order_by(CommentOptionVote.created_utc).all() return render_template("poll_votes.html", v=v,