Skip to content

Commit

Permalink
adding active votes to posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Meyer committed Mar 21, 2018
1 parent b780e92 commit 3cfb28d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions trufflepig/bchain/checkops.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,15 @@ def get_parent_posts(comment_authors_and_permalinks, steem):
post = {
'title': p.title,
'reward': p.reward.amount,
'votes': len(p.active_votes),
'votes': len([x for x in p.active_votes if x['percent'] > 0]),
'active_votes': p.active_votes,
'created': p.created,
'tags': p.tags,
'body': p.body,
'author': p.author,
'permalink': p.permlink,
'comment_author': comment_author,
'comment_permalink': comment_permalink,
'active_votes': p.active_votes
'comment_permalink': comment_permalink
}
posts.append(post)

Expand Down
3 changes: 2 additions & 1 deletion trufflepig/bchain/getdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ def get_post_data(authors_and_permalinks, steem, exclusion_voters):
post = {
'title': p.title,
'reward': p.reward.amount,
'votes': len(p.active_votes),
'votes': len([x for x in p.active_votes if x['percent'] > 0]),
'active_votes': p.active_votes,
'created': p.created,
'tags': p.tags,
'body': p.body,
Expand Down

0 comments on commit 3cfb28d

Please sign in to comment.