same as last commit

master
Aevann 2023-10-17 22:40:24 +03:00
parent 6c899deede
commit 0cd7714d61
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def sort_objects(sort, objects, cls):
elif sort == "controversial" and cls.__name__ == "Post":
return objects.order_by((cls.upvotes+1)/(cls.downvotes+1) + (cls.downvotes+1)/(cls.upvotes+1) - cls.comment_count/500, cls.downvotes.desc(), cls.created_utc.desc())
elif sort == "controversial":
return objects.order_by((cls.upvotes+1)/(cls.downvotes+1) + (cls.downvotes+1)/(cls.upvotes+1) + cls.downvotes/10, cls.downvotes.desc(), cls.created_utc.desc())
return objects.order_by((cls.upvotes+1)/(cls.downvotes+1) + (cls.downvotes+1)/(cls.upvotes+1) - cls.downvotes/10, cls.downvotes.desc(), cls.created_utc.desc())
elif sort == "bottom":
return objects.order_by(cls.upvotes - cls.downvotes, cls.created_utc.desc())
elif sort == "random":