commit 8aa967f32d8e7ca6da2d759bd49f0bb4ee2021b0
parent c1f563b7e613da1c8bded39e6012348702d69201
Author: Adrián Oliva <[email protected]>
Date: Sun, 7 May 2023 19:15:42 -0600
Balance is now sorted!
Apparently it can only be sorted alphabetically. So I hard-coded it.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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 = ''