This commit is contained in:
Aevann1 2021-10-20 16:37:46 +02:00
parent 626795f9cb
commit d2c84bdb62
20 changed files with 57 additions and 332 deletions

View file

@ -145,7 +145,7 @@ def post_id(pid, anything=None, v=None):
elif sort == "controversial":
comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes)
elif sort == "top":
comments = comments.order_by(Comment.downvotes - Comment.upvotes)
comments = comments.order_by(Comment.upvotes + Comment.downvotes)
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)
@ -170,7 +170,7 @@ def post_id(pid, anything=None, v=None):
elif sort == "controversial":
comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes)
elif sort == "top":
comments = comments.order_by(Comment.downvotes - Comment.upvotes)
comments = comments.order_by(Comment.upvotes + Comment.downvotes)
elif sort == "bottom":
comments = comments.order_by(Comment.upvotes - Comment.downvotes)