From cb77bf0d9ad730a958ee3724e3e78c0924791649 Mon Sep 17 00:00:00 2001 From: jsalyers <jsalyers@syncad.com> Date: Thu, 12 Nov 2020 16:37:43 -0500 Subject: [PATCH] [JES] Missed a param --- hive/server/bridge_api/methods.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hive/server/bridge_api/methods.py b/hive/server/bridge_api/methods.py index da44d47d3..edda1018c 100644 --- a/hive/server/bridge_api/methods.py +++ b/hive/server/bridge_api/methods.py @@ -103,7 +103,7 @@ async def _get_ranked_posts_for_observer_communities( db, sort:str, start_author assert False, "Unknown sort order" @return_error_info -async def _get_ranked_posts_for_communities( db, sort:str, community, start_author:str, start_permlink:str, limit): +async def _get_ranked_posts_for_communities( db, sort:str, community, start_author:str, start_permlink:str, limit, observer:str=None): async def execute_community_query(db, sql, limit): return await db.query_all(sql, community=community, author=start_author, permlink=start_permlink, limit=limit ) @@ -128,7 +128,7 @@ async def _get_ranked_posts_for_communities( db, sort:str, community, start_auth return await execute_community_query(db, sql, limit) if sort == 'created': - sql = "SELECT * FROM bridge_get_ranked_post_by_created_for_community( (:community)::VARCHAR, (:author)::VARCHAR, (:permlink)::VARCHAR, (:limit)::SMALLINT, True )" + sql = "SELECT * FROM bridge_get_ranked_post_by_created_for_community( (:community)::VARCHAR, (:author)::VARCHAR, (:permlink)::VARCHAR, (:limit)::SMALLINT, True, (:observer)::VARCHAR )" result_with_pinned_posts = await execute_community_query(db, pinned_sql, limit) limit -= len(result_with_pinned_posts) if limit > 0: -- GitLab