From 2c6256b497230aa407526cd46bae69eabe3fcc30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 5 Aug 2020 00:28:43 +0800 Subject: [PATCH] Fixed to return as JSON in the get_summary_categories() utility in the accounting application. --- accounting/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounting/utils.py b/accounting/utils.py index 0cd116e..08b087a 100644 --- a/accounting/utils.py +++ b/accounting/utils.py @@ -361,8 +361,8 @@ def get_summary_categories(): if row["category"] not in categories[key]: categories[key][row["category"]] = row["account__code"] # Converts the dictionary to a list, as the category may not be US-ASCII - return {t: [[c, categories[t][c]] for c in categories[t]] - for t in categories.keys()} + return json.dumps({t: [[c, categories[t][c]] for c in categories[t]] + for t in categories.keys()}) def fill_txn_from_post(txn_type, txn, post):