Skip to content
Snippets Groups Projects
Commit b3ea5440 authored by Marcin's avatar Marcin
Browse files

issue#37: correct pending payouts values in condenser api methods

parent e0fc0ca3
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,!81Mi issue 37 wrong pending payout
This commit is part of merge request !81. Comments created here will be created in the context of that merge request.
......@@ -34,6 +34,7 @@ SQL_TEMPLATE = """
hp.promoted,
hp.payout,
hp.payout_at,
hp.pending_payout,
hp.is_paidout,
hp.children,
hp.votes,
......
......@@ -181,6 +181,7 @@ def _condenser_post_object(row, truncate_body=0):
if not row['category']:
row['category'] = 'undefined'
full_payout = row['pending_payout'] + row['payout'];
post = {}
post['post_id'] = row['id']
post['author'] = row['author']
......@@ -201,7 +202,7 @@ def _condenser_post_object(row, truncate_body=0):
post['cashout_time'] = json_date(None if paid else row['payout_at'])
post['total_payout_value'] = _amount(row['payout'] if paid else 0)
post['curator_payout_value'] = _amount(0)
post['pending_payout_value'] = _amount(row['pending_payout'])
post['pending_payout_value'] = _amount(0 if paid else full_payout)
post['promoted'] = _amount(row['promoted'])
post['replies'] = []
......
Subproject commit a88d42a79b9f006466d7a15650ccdc68f56004ea
Subproject commit ee20b992bb7dae36ea964bde1e3b7f58b103dae6
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