Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
b3ea5440
Commit
b3ea5440
authored
4 years ago
by
Marcin
Browse files
Options
Downloads
Patches
Plain Diff
issue#37: correct pending payouts values in condenser api methods
parent
e0fc0ca3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!456
Release candidate v1 24
,
!230
Setup monitoring with pghero
,
!135
Enable postgres monitoring on CI server
,
!81
Mi issue 37 wrong pending payout
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hive/server/condenser_api/methods.py
+1
-0
1 addition, 0 deletions
hive/server/condenser_api/methods.py
hive/server/condenser_api/objects.py
+2
-1
2 additions, 1 deletion
hive/server/condenser_api/objects.py
tests/tests_api
+1
-1
1 addition, 1 deletion
tests/tests_api
with
4 additions
and
2 deletions
hive/server/condenser_api/methods.py
+
1
−
0
View file @
b3ea5440
...
@@ -34,6 +34,7 @@ SQL_TEMPLATE = """
...
@@ -34,6 +34,7 @@ SQL_TEMPLATE = """
hp.promoted,
hp.promoted,
hp.payout,
hp.payout,
hp.payout_at,
hp.payout_at,
hp.pending_payout,
hp.is_paidout,
hp.is_paidout,
hp.children,
hp.children,
hp.votes,
hp.votes,
...
...
This diff is collapsed.
Click to expand it.
hive/server/condenser_api/objects.py
+
2
−
1
View file @
b3ea5440
...
@@ -181,6 +181,7 @@ def _condenser_post_object(row, truncate_body=0):
...
@@ -181,6 +181,7 @@ def _condenser_post_object(row, truncate_body=0):
if
not
row
[
'
category
'
]:
if
not
row
[
'
category
'
]:
row
[
'
category
'
]
=
'
undefined
'
row
[
'
category
'
]
=
'
undefined
'
full_payout
=
row
[
'
pending_payout
'
]
+
row
[
'
payout
'
];
post
=
{}
post
=
{}
post
[
'
post_id
'
]
=
row
[
'
id
'
]
post
[
'
post_id
'
]
=
row
[
'
id
'
]
post
[
'
author
'
]
=
row
[
'
author
'
]
post
[
'
author
'
]
=
row
[
'
author
'
]
...
@@ -201,7 +202,7 @@ def _condenser_post_object(row, truncate_body=0):
...
@@ -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
[
'
cashout_time
'
]
=
json_date
(
None
if
paid
else
row
[
'
payout_at
'
])
post
[
'
total_payout_value
'
]
=
_amount
(
row
[
'
payout
'
]
if
paid
else
0
)
post
[
'
total_payout_value
'
]
=
_amount
(
row
[
'
payout
'
]
if
paid
else
0
)
post
[
'
curator_payout_value
'
]
=
_amount
(
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
[
'
promoted
'
]
=
_amount
(
row
[
'
promoted
'
])
post
[
'
replies
'
]
=
[]
post
[
'
replies
'
]
=
[]
...
...
This diff is collapsed.
Click to expand it.
tests_api
@
ee20b992
Compare
a88d42a7
...
ee20b992
Subproject commit
a88d42a79b9f006466d7a15650ccdc68f56004ea
Subproject commit
ee20b992bb7dae36ea964bde1e3b7f58b103dae6
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment