From c52dfe6a1673299f7c3f8b221134d9d9ace1d323 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 13 Mar 2025 20:47:54 +0100 Subject: [PATCH] Fix minor bugs. --- src/run.py | 1 + src/templates/balance.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/run.py b/src/run.py index 68aa534..f0991ab 100755 --- a/src/run.py +++ b/src/run.py @@ -510,6 +510,7 @@ class Handler(PlomHttpHandler): break if already_registered: continue + Account.ensure_in_dict(path, self.server.accounts) before = self.server.accounts[path].get_wealth(id_ - 1) after = self.server.accounts[path].get_wealth(id_) direct_target = full_path == path diff --git a/src/templates/balance.tmpl b/src/templates/balance.tmpl index 5904cc0..cfd46f7 100644 --- a/src/templates/balance.tmpl +++ b/src/templates/balance.tmpl @@ -4,7 +4,7 @@ {% macro account_with_children(booking_id, account, indent) %} - {% if account.get_wealth().moneys|length == 1 %} + {% if account.get_wealth(booking_id).moneys|length == 1 %} {% for curr, amt in account.get_wealth(booking_id).moneys.items() %} {{ macros.tr_money_balance(amt, curr) }} -- 2.30.2