Sort comments by date posted

This commit is contained in:
Sander Ferdinand 2018-08-18 21:53:41 +02:00
parent 032437c37b
commit 3d64e48de8
1 changed files with 1 additions and 0 deletions

View File

@ -167,6 +167,7 @@ class Proposal(base):
q = db_session.query(Comment)
q = q.filter(Comment.proposal_id == self.id)
q = q.filter(Comment.replied_to == None)
q = q.order_by(Comment.date_added.desc())
comments = q.all()
for c in comments: