From 8aa967f32d8e7ca6da2d759bd49f0bb4ee2021b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Oliva?= Date: Sun, 7 May 2023 19:15:42 -0600 Subject: Balance is now sorted! Apparently it can only be sorted alphabetically. So I hard-coded it. --- utils/balance.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'utils') diff --git a/utils/balance.py b/utils/balance.py index c13dee8..750f998 100644 --- a/utils/balance.py +++ b/utils/balance.py @@ -51,6 +51,8 @@ class tree: def __str__(self, level=0, ignore_level = False) -> str: + self.children.sort(key=lambda child: child.name) + result = '' if not ignore_level: for price in self.value: @@ -89,6 +91,7 @@ class accounts_tree: def __str__(self) -> str: + self.my_accounts.children.sort(key=lambda child: child.name) self.my_accounts.compute_value() result = '' -- cgit v1.2.3