From de21363ca6d536219aaa81b51b913b2783d95027 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 21 Dec 2021 01:50:02 +0200 Subject: [PATCH] fsdfds --- files/classes/user.py | 4 ++++ files/templates/notifications.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 5378ace78..58ff5d2b0 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -377,6 +377,10 @@ class User(Base): def post_notifications_count(self): return g.db.query(Notification.id).join(Comment).filter(Notification.user_id == self.id, Notification.read == False, Comment.author_id == AUTOJANNY_ID).count() + @property + @lazy + def not_post_notifications_count(self): + return self.notifications_count - self.post_notifications_count @property @lazy diff --git a/files/templates/notifications.html b/files/templates/notifications.html index e8581a7ef..7cd7d9471 100644 --- a/files/templates/notifications.html +++ b/files/templates/notifications.html @@ -16,8 +16,8 @@