Add source info and sort transactions

This commit is contained in:
2025-12-09 21:27:48 -05:00
parent 12408c33f4
commit a190ddc524
6 changed files with 1142 additions and 932 deletions

View File

@@ -70,7 +70,7 @@ def write_mappings(transactions: List[Transaction], mappings_file: Path):
mappings = read_mappings(mappings_file)
for t in transactions:
if t.row in mappings:
if t.key() in mappings:
pass
else:
mapping = Mapping(
@@ -79,7 +79,7 @@ def write_mappings(transactions: List[Transaction], mappings_file: Path):
"narration": t.description,
}
)
mappings[t.row] = mapping
mappings[t.key()] = mapping
mappings = {k: v.model_dump(exclude_none=True) for k, v in mappings.items()}
with open(mappings_file, "w") as f: