From e4963ca0d39b066a12854d7468ec6bf1e10cb05c Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Thu, 29 Aug 2019 14:13:37 +0100 Subject: [PATCH] make sure all letter costs are cast from decimal to float --- app/platform_stats/rest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/platform_stats/rest.py b/app/platform_stats/rest.py index 9ec0f2819..f5af54c0a 100644 --- a/app/platform_stats/rest.py +++ b/app/platform_stats/rest.py @@ -84,7 +84,7 @@ def get_usage_for_all_services(): for l in letter_costs: if l.service_id in combined: - combined[l.service_id].update({'letter_cost': l.letter_cost}) + combined[l.service_id].update({'letter_cost': float(l.letter_cost)}) else: letter_entry = { "organisation_id": str(l.organisation_id) if l.organisation_id else "",