diff --git a/yadc/bp/post.py b/yadc/bp/post.py index ae21023..df58bc4 100644 --- a/yadc/bp/post.py +++ b/yadc/bp/post.py @@ -53,7 +53,7 @@ def posts(page): if f_tags: posts_query = posts_query.filter(Tag.content.in_(f_tags)).having(func.count(Post.id)==len(f_tags)) if current_user.is_anonymous or not current_user.is_moderator: - posts_query = posts_query.filter_by(status=POST_STATUS.active) + posts_query = posts_query.filter(Post.status==POST_STATUS.active) posts_query = posts_query.filter(Post.rating.in_(m_ratings)).order_by(Post.created.desc()) posts = posts_query.paginate(page, current_app.config.get('POSTS_PER_PAGE'))