diff --git a/files/classes/comment.py b/files/classes/comment.py index 09d207620..cdc78951e 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 1cb760af3..bccba7b60 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)