From 76c660c8f54421793f642c8b5bba1f1cebb8af51 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 1 Sep 2021 21:46:11 +0200 Subject: [PATCH] fd --- files/routes/front.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index bf26c7432f..c9940711a2 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -51,16 +51,14 @@ def notifications(v): Comment.author_id != AUTOJANNY_ACCOUNT, ).order_by(Notification.id.desc()).offset(25 * (page - 1)).limit(26) + next_exists = (len(notifications) == 26) + notifications = notifications[:25] cids = [x.comment_id for x in notifications] - next_exists = (len(cids) == 26) - cids = cids[:25] comments = get_comments(cids, v=v, load_parent=True) i = 0 for x in notifications: - if not x.read: - try: comments[i].unread = True - except: pass + if not x.read: comments[i].unread = True x.read = True g.db.add(x) i += 1