From 2116309b8bd9868925091da729f1aca34a041a88 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Feb 2022 07:42:06 +0200 Subject: [PATCH] fsd --- files/classes/comment.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 4a7df919ca..a4fbd92af9 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -197,11 +197,6 @@ class Comment(Base): @property def replies(self): - print(self.id, flush=True) - if self.id == 1313520: - print('wtf') - print(self.replies2, flush=True) - return [] if self.replies2 != None: return [x for x in self.replies2 if not x.author.shadowbanned] 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)), key=lambda x: x.realupvotes, reverse=True) @@ -215,9 +210,8 @@ 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) - return r + if self.replies2 != None: return self.replies2 + return 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) @property @lazy