From 18c7fb365e583c603e91e62d31d75e1dbc63c414 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 12 Nov 2022 11:24:02 +0200 Subject: [PATCH] move the logic for my prev commit to SQLalchemy --- files/routes/notifications.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 894ca4272..87caaffd2 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -261,12 +261,13 @@ def notifications(v): try: page = max(int(request.values.get("page", 1)), 1) except: page = 1 - comments = g.db.query(Comment, Notification).join(Notification.comment).filter( + comments = g.db.query(Comment, Notification).join(Notification.comment).join(Comment.author).filter( Notification.user_id == v.id, Comment.is_banned == False, Comment.deleted_utc == 0, Comment.body_html.notlike('%

New site mention%