From 6662ae805366d1861029bda52f0f33e18b47b703 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 16 Jan 2022 09:35:41 +0200 Subject: [PATCH] bbb --- files/classes/comment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 12e8273b27..412d0d1fd5 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -199,7 +199,7 @@ class Comment(Base): def replies(self): r = self.__dict__.get("replies", None) if r: r = [x for x in r if not x.author.shadowbanned] - if not r and r != []: r = sorted([x for x in self.child_comments if not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)], key=lambda x: x.realupvotes, reverse=True) + if not r and r != []: r = sorted((x for x in self.child_comments if not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)), key=lambda x: x.realupvotes, reverse=True) return r @replies.setter @@ -217,7 +217,7 @@ class Comment(Base): @property def replies3(self): r = self.__dict__.get("replies", None) - if not r and r != []: r = sorted([x for x in self.child_comments if x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)], key=lambda x: x.realupvotes, reverse=True) + if not r and r != []: r = sorted((x for x in self.child_comments if x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)), key=lambda x: x.realupvotes, reverse=True) return r @property