This commit is contained in:
Aevann1 2021-12-21 01:50:02 +02:00
parent 68e40e3b73
commit 88d574e166
2 changed files with 6 additions and 2 deletions

View file

@ -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