From a87a94ce60ee7c68a1fc231d4713ea9604ecab3f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 12 Apr 2022 16:59:37 +0200 Subject: [PATCH] fdsfds --- files/routes/front.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/front.py b/files/routes/front.py index 59743efadf..eecf11577c 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -134,7 +134,9 @@ def notifications(v): c.replies2 = c.child_comments.filter(or_(Comment.author_id == v.id, Comment.id.in_(cids))).all() for x in c.replies2: if x.replies2 == None: x.replies2 = [] - while c.parent_comment and (c.parent_comment.author_id == v.id or c.parent_comment.id in cids): + count = 0 + while count < 5 and c.parent_comment and (c.parent_comment.author_id == v.id or c.parent_comment.id in cids): + count += 1 c = c.parent_comment if c.replies2 == None: c.replies2 = c.child_comments.filter(or_(Comment.author_id == v.id, Comment.id.in_(cids))).all()