show posts by users who block you

master
Aevann1 2022-06-29 05:07:00 +02:00
parent 385f867be9
commit c341be2866
2 changed files with 1 additions and 3 deletions

View File

@ -701,7 +701,7 @@ class User(Base):
@property
@lazy
def userblocks(self):
return [x[0] for x in g.db.query(UserBlock.target_id).filter_by(user_id=self.id).all()] + [x[0] for x in g.db.query(UserBlock.user_id).filter_by(target_id=self.id).all()]
return [x[0] for x in g.db.query(UserBlock.target_id).filter_by(user_id=self.id).all()]
@lazy
def saved_idlist(self, page=1):

View File

@ -368,8 +368,6 @@ def changeloglist(v=None, sort="new", page=1, t="all", site=None):
posts = g.db.query(Submission.id).filter_by(is_banned=False, private=False, deleted_utc=0)
posts = posts.filter(Submission.author_id.notin_(v.userblocks))
allowed = g.db.query(User.id).filter(User.admin_level > 0).all() + g.db.query(Badge.user_id).filter_by(badge_id=3).all()
allowed = [x[0] for x in allowed]