home · contact · privacy
Fix broken sink summation.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 22 Jan 2025 13:55:30 +0000 (14:55 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 22 Jan 2025 13:55:30 +0000 (14:55 +0100)
ledger.py

index c7f3116a4748be4ba261a2434cd9ccec71c2ce57..89cf94fca69ad0bebfdcffc5a091951adb2819e9 100755 (executable)
--- a/ledger.py
+++ b/ledger.py
@@ -44,7 +44,7 @@ class Wealth:
         """Drop zero amounts, invert non-zero ones."""
         sink = Wealth()
         for moneys in [Wealth({c: a}) for c, a in self.moneys.items() if a]:
-            sink = moneys
+            sink -= moneys
         return sink