From 14c6d2e4bf4dbdb505f56152e95b5968ec24e609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sun, 2 Aug 2020 23:08:13 +0800 Subject: [PATCH] Revised the sort_post_txn_records() utility to fill in the new order as strings instead of integers in the accounting applications. --- accounting/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounting/utils.py b/accounting/utils.py index 5b3e5cd..4fba9f1 100644 --- a/accounting/utils.py +++ b/accounting/utils.py @@ -373,7 +373,7 @@ def sort_post_txn_records(post): for i in range(len(record_no[record_type])): old_no = record_no[record_type][i] no = i + 1 - new_post[F"{record_type}-{no}-ord"] = no + new_post[F"{record_type}-{no}-ord"] = str(no) for attr in ["id", "account", "summary", "amount"]: if F"{record_type}-{old_no}-{attr}" in post: new_post[F"{record_type}-{no}-{attr}"]\