Skip to content
Snippets Groups Projects
Commit 9ed29a96 authored by Andrzej Lisak's avatar Andrzej Lisak
Browse files

[ABW]: [Fix] net_rshares collected dynamically from votes on call

[Fix] condenser_api::get_content_replies uses short active_votes form
parent f9b88cac
No related branches found
No related tags found
4 merge requests!456Release candidate v1 24,!230Setup monitoring with pghero,!135Enable postgres monitoring on CI server,!54Net rshares fix
......@@ -608,7 +608,7 @@ def setup(db):
0 AS active_votes,
hp.created_at,
hp.updated_at,
hp.rshares,
(SELECT SUM( v.rshares ) FROM hive_votes v WHERE v.post_id = hp.id GROUP BY v.post_id) AS rshares,
hpd.json,
ha_a.reputation AS author_rep,
hp.is_hidden,
......
......@@ -141,7 +141,7 @@ async def resultset_to_posts(db, resultset, truncate_body=0):
row = dict(row)
row['author_rep'] = author_reps[row['author']]
post = _condenser_post_object(row, truncate_body=truncate_body)
post['active_votes'] = await find_votes({'db':db}, {'author':row['author'], 'permlink':row['permlink']})
post['active_votes'] = await find_votes({'db':db}, {'author':row['author'], 'permlink':row['permlink']}, VotesPresentation.CondenserApi)
posts.append(post)
return posts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment