From 73e26f19461c5f8f9e59b3633089f43c044593da Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 30 Jul 2022 00:32:26 +0200 Subject: [PATCH] fix phantom notifications --- files/classes/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/user.py b/files/classes/user.py index 6347fcdf13..798717bb7c 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -459,7 +459,7 @@ class User(Base): Comment.is_banned == False, Comment.deleted_utc == 0) if not self.shadowbanned and self.admin_level < 3: - notifs = notifs.join(Notification.user).filter(User.shadowbanned == None) + notifs = notifs.join(Comment.author).filter(User.shadowbanned == None) return notifs.count() + self.post_notifications_count