From b4cd8e0100dd0841dbd9fc73a05b2f80deb44e39 Mon Sep 17 00:00:00 2001 From: jsalyers <jsalyers@syncad.com> Date: Fri, 4 Dec 2020 13:55:49 -0500 Subject: [PATCH] [JES] Validate observer account exists. I'm not sure if we need this. I suppose it could impact performance if the account didn't exist in the database? --- hive/db/sql_scripts/bridge_get_ranked_post_for_all.sql | 2 +- hive/db/sql_scripts/bridge_get_ranked_post_for_communities.sql | 2 +- hive/db/sql_scripts/bridge_get_ranked_post_for_tag.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hive/db/sql_scripts/bridge_get_ranked_post_for_all.sql b/hive/db/sql_scripts/bridge_get_ranked_post_for_all.sql index 4ad087293..95fb2deb8 100644 --- a/hive/db/sql_scripts/bridge_get_ranked_post_for_all.sql +++ b/hive/db/sql_scripts/bridge_get_ranked_post_for_all.sql @@ -154,7 +154,7 @@ DECLARE __observer_id INT; BEGIN __post_id = find_comment_id( _author, _permlink, True ); - __observer_id = find_account_id(_observer, False); + __observer_id = find_account_id(_observer, True); IF __post_id <> 0 THEN SELECT ( hp.payout + hp.pending_payout ) INTO __payout_limit FROM hive_posts hp WHERE hp.id = __post_id; END IF; diff --git a/hive/db/sql_scripts/bridge_get_ranked_post_for_communities.sql b/hive/db/sql_scripts/bridge_get_ranked_post_for_communities.sql index f16a20ecd..d29491f3a 100644 --- a/hive/db/sql_scripts/bridge_get_ranked_post_for_communities.sql +++ b/hive/db/sql_scripts/bridge_get_ranked_post_for_communities.sql @@ -383,7 +383,7 @@ BEGIN IF __post_id <> 0 THEN SELECT ( hp.payout + hp.pending_payout ) INTO __payout_limit FROM hive_posts hp WHERE hp.id = __post_id; END IF; - __observer_id = find_account_id(_observer, False); + __observer_id = find_account_id(_observer, True); RETURN QUERY SELECT hp.id, hp.author, diff --git a/hive/db/sql_scripts/bridge_get_ranked_post_for_tag.sql b/hive/db/sql_scripts/bridge_get_ranked_post_for_tag.sql index aca86aeca..d9bddcd4d 100644 --- a/hive/db/sql_scripts/bridge_get_ranked_post_for_tag.sql +++ b/hive/db/sql_scripts/bridge_get_ranked_post_for_tag.sql @@ -166,7 +166,7 @@ BEGIN SELECT ( hp.payout + hp.pending_payout ) INTO __payout_limit FROM hive_posts hp WHERE hp.id = __post_id; END IF; __hive_tag = ARRAY_APPEND( __hive_tag, find_tag_id( _tag, True ) ); - __observer_id = find_account_id(_observer, False); + __observer_id = find_account_id(_observer, True); RETURN QUERY SELECT hp.id, hp.author, -- GitLab