diff --git a/files/classes/user.py b/files/classes/user.py index 6bd433885..75c145c50 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -594,7 +594,7 @@ class User(Base): .filter( Notification.read == False, Notification.user_id == self.id, - not_(and_(Comment.sentto != None, Comment.sentto == MODMAIL_ID, User.is_muted)), + not_(and_(Comment.sentto == MODMAIL_ID, User.is_muted)), )) if not self.can_see_shadowbanned: diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 994c723c3..fb1efb996 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -298,7 +298,7 @@ def notifications(v:User): comments = g.db.query(Comment, Notification).join(Notification.comment).join(Comment.author).filter( Notification.user_id == v.id, or_(Comment.sentto == None, Comment.sentto == MODMAIL_ID), - not_(and_(Comment.sentto != None, Comment.sentto == MODMAIL_ID, User.is_muted)), + not_(and_(Comment.sentto == MODMAIL_ID, User.is_muted)), ) if v.admin_level < PERMS['USER_SHADOWBAN']: