From 690e1ba280fea8ee2e2cb5a12c0fdae34715c9d2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 16 Apr 2022 18:41:38 +0200 Subject: [PATCH] fds --- files/classes/comment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/classes/comment.py b/files/classes/comment.py index fbe536bc9..5b546d61d 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -220,6 +220,8 @@ class Comment(Base): @property def replies(self): if self.replies2 != None: return [x for x in self.replies2 if not x.author.shadowbanned] + if not self.parent_submission: + return sorted((x for x in self.child_comments if x.author and not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID, AUTOCHOICE_ID)), key=lambda x: x.created_utsc) return sorted((x for x in self.child_comments if x.author and not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID, AUTOCHOICE_ID)), key=lambda x: x.realupvotes, reverse=True) @property