forked from MarseyWorld/MarseyWorld
parent
6cf3ac2cc5
commit
948bd21f9b
|
@ -42,5 +42,5 @@ def sort_objects(sort, objects, cls, include_shadowbanned=False):
|
|||
return objects.order_by((cls.upvotes+1)/(cls.downvotes+1) + (cls.downvotes+1)/(cls.upvotes+1), cls.downvotes.desc(), cls.created_utc.desc())
|
||||
elif sort == "bottom":
|
||||
return objects.order_by(cls.upvotes - cls.downvotes, cls.created_utc.desc())
|
||||
elif sort == "top":
|
||||
else:
|
||||
return objects.order_by(cls.downvotes - cls.upvotes, cls.created_utc.desc())
|
||||
|
|
Loading…
Reference in New Issue