diff --git a/files/routes/users.py b/files/routes/users.py index 8a77fcd7e..2ec0461f6 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -166,7 +166,6 @@ def upvoters_downvoters(v, username, username2, cls, vote_cls, vote_dir, templat page = get_page() listing = g.db.query(cls).options(load_only(cls.id)).join(vote_cls).filter( - cls.draft == False, cls.ghost == False, cls.is_banned == False, cls.deleted_utc == 0, @@ -174,6 +173,9 @@ def upvoters_downvoters(v, username, username2, cls, vote_cls, vote_dir, templat cls.author_id == id, vote_cls.user_id == uid, ) + + if cls == Post: + listing = listing.filter_by(private=False) total = listing.count() @@ -230,7 +232,6 @@ def upvoting_downvoting(v, username, username2, cls, vote_cls, vote_dir, templat page = get_page() listing = g.db.query(cls).options(load_only(cls.id)).join(vote_cls).filter( - cls.draft == False, cls.ghost == False, cls.is_banned == False, cls.deleted_utc == 0, @@ -239,6 +240,9 @@ def upvoting_downvoting(v, username, username2, cls, vote_cls, vote_dir, templat cls.author_id == uid, ) + if cls == Post: + listing = listing.filter_by(private=False) + total = listing.count() listing = listing.order_by(cls.created_utc.desc()).offset(PAGE_SIZE * (page - 1)).limit(PAGE_SIZE).all()