From df2f5d3b617b2d01872ea176b9b3fe44082a1a50 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 19 Aug 2022 14:50:35 +0200 Subject: [PATCH] restore downvotes acting like upvotes in rdrama for comments --- files/helpers/sorting_and_time.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/helpers/sorting_and_time.py b/files/helpers/sorting_and_time.py index 019c369513..31ad9d3630 100644 --- a/files/helpers/sorting_and_time.py +++ b/files/helpers/sorting_and_time.py @@ -30,6 +30,8 @@ def sort_comments(sort, comments): return comments.order_by((Comment.upvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1), Comment.downvotes.desc(), Comment.id.desc()) elif sort == "bottom": return comments.order_by(Comment.upvotes - Comment.downvotes) + elif SITE_NAME == 'rDrama': + return comments.order_by(Comment.realupvotes.desc(), Comment.id.desc()) else: return comments.order_by(Comment.downvotes - Comment.upvotes, Comment.id.desc())