master
Aevann1 2022-02-10 01:24:30 +02:00
parent c3de1aa33f
commit a1969aa1ea
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
elif sort == "old":
posts = posts.order_by(Submission.created_utc.asc())
elif sort == "controversial":
posts = posts.order_by((Submission.upvotes+1)/(Submission.downvotes+1) + (Submission.downvotes+1)/(Submission.upvotes+1) - Submission.downvotes)
posts = posts.order_by((Submission.upvotes+1)/(Submission.downvotes+1) + (Submission.downvotes+1)/(Submission.upvotes+1))
elif sort == "top":
posts = posts.order_by(Submission.downvotes - Submission.upvotes)
elif sort == "bottom":