From 3a3cb0da4dcf88c59e9c6ed33672f9d64137f6d2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 13 Oct 2022 18:21:00 +0200 Subject: [PATCH] minor change in sorting_and_time --- files/helpers/sorting_and_time.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/sorting_and_time.py b/files/helpers/sorting_and_time.py index 0dc6691e3..42ebb3f68 100644 --- a/files/helpers/sorting_and_time.py +++ b/files/helpers/sorting_and_time.py @@ -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()) - else: + elif sort == "top": return objects.order_by(cls.downvotes - cls.upvotes, cls.created_utc.desc())