From 0b9ced6e50f429b51ae9f1e7bc992885f4981083 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 17 Feb 2022 08:32:04 +0200 Subject: [PATCH] fd --- files/classes/comment.py | 2 +- files/routes/front.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 09d2076207..cdc78951ee 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -205,7 +205,7 @@ class Comment(Base): @property def replies(self): - if self.replies2 != None: return [x for x in self.replies2 if not x.author.shadowbanned] + 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, AUTOCHOICE_ID)), key=lambda x: x.realupvotes, reverse=True) @property diff --git a/files/routes/front.py b/files/routes/front.py index 1cb760af3f..bccba7b60d 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -110,7 +110,7 @@ def notifications(v): else: while c.parent_comment: c = c.parent_comment - c.replies = g.db.query(Comment).filter_by(parent_comment_id=c.id).order_by(Comment.id).all() + c.replies2 = g.db.query(Comment).filter_by(parent_comment_id=c.id).order_by(Comment.id).all() if c not in listing: listing.append(c)