forked from rDrama/rDrama
parent
d674390f1a
commit
fb0aed8e2b
|
@ -769,7 +769,8 @@ class User(Base):
|
|||
Post.notify == True,
|
||||
Post.author_id != self.id,
|
||||
Post.ghost == False,
|
||||
Post.author_id.notin_(self.userblocks)
|
||||
Post.author_id.notin_(self.userblocks),
|
||||
or_(Post.sub == None, Post.sub.notin_(self.sub_blocks)),
|
||||
).count()
|
||||
|
||||
@property
|
||||
|
|
|
@ -174,7 +174,8 @@ def notifications_posts(v):
|
|||
Post.notify == True,
|
||||
Post.author_id != v.id,
|
||||
Post.ghost == False,
|
||||
Post.author_id.notin_(v.userblocks)
|
||||
Post.author_id.notin_(v.userblocks),
|
||||
or_(Post.sub == None, Post.sub.notin_(v.sub_blocks)),
|
||||
).options(load_only(Post.id))
|
||||
|
||||
total = listing.count()
|
||||
|
|
Loading…
Reference in New Issue