From 6febbc4858c11b1dd3819f91d5e1a81b13c467f8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 25 May 2022 19:09:26 +0200 Subject: [PATCH] scratch that --- files/classes/comment.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index bb51e86be1..0d892e25b7 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -218,9 +218,9 @@ class Comment(Base): 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 self.child_comments.join(User, User.id == Comment.author_id).filter(User.shadowbanned == None).order_by(Comment.id).all() - return self.child_comments.join(User, User.id == Comment.author_id).filter(User.shadowbanned == None, Comment.author_id.notin_((AUTOPOLLER_ID, AUTOBETTER_ID, AUTOCHOICE_ID))).order_by(Comment.realupvotes.desc()).all() - + return [x for x in self.child_comments.order_by(Comment.id) if not x.author.shadowbanned] + return [x for x in self.child_comments.filter(Comment.author_id.notin_((AUTOPOLLER_ID, AUTOBETTER_ID, AUTOCHOICE_ID))).order_by(Comment.realupvotes.desc()) if not x.author.shadowbanned] + @property def replies3(self):