hide ghost posts from post notifications

master
Aevann1 2022-07-12 21:42:23 +02:00
parent bc927ef238
commit 077353c1f4
2 changed files with 3 additions and 1 deletions

View File

@ -481,7 +481,8 @@ class User(Base):
Submission.deleted_utc == 0,
Submission.is_banned == False,
Submission.private == False,
Submission.author_id != self.id
Submission.author_id != self.id,
Submission.ghost == False
).count()
@property

View File

@ -102,6 +102,7 @@ def notifications_posts(v):
Submission.is_banned == False,
Submission.private == False,
Submission.author_id != v.id,
Submission.ghost == False
).order_by(Submission.created_utc.desc()).offset(25 * (page - 1)).limit(26).all()]
next_exists = (len(listing) > 25)