Skip to content

Commit d19590a

Browse files
committed
Fix encoding of values to JSON
1 parent 3a9134a commit d19590a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

netflowbot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ def perform_account_aggr_job(*args, **job_params):
255255
log.warning("No values found to be sent to Grafolean")
256256
return
257257

258+
# the values are Decimals because they come from BIGINT column, so we must transform
259+
# them to strings before encoding to JSON:
260+
values = [{'p': v['p'], 'v': str(v['v'])} for v in values]
261+
258262
# send the data to Grafolean:
259263
send_results_to_grafolean(
260264
job_params['backend_url'],

0 commit comments

Comments
 (0)