spaghetti
This commit is contained in:
parent
ab9a7ada92
commit
37d32453d4
2 changed files with 7 additions and 2 deletions
|
@ -418,6 +418,11 @@ class User(Base):
|
|||
def post_notifications_count(self):
|
||||
return g.db.query(Notification.user_id).join(Comment).filter(Notification.user_id == self.id, Notification.read == False, Comment.author_id == AUTOJANNY_ID).count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def reddit_notifications_count(self):
|
||||
return g.db.query(Notification.user_id).join(Comment).filter(Notification.user_id == self.id, Notification.read == False, Comment.author_id == AUTOJANNY_ID, Comment.body_html.like('<html><body><p>New rdrama mention: <a href="https://old.reddit.com/r/%')).count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def not_post_notifications_count(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue