From 695b1e94df0065f0777a2da2de1ab276992db29a Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Thu, 22 Jan 2026 22:42:18 -0600 Subject: [PATCH] scripts: csv.py: Fixed issues with non-default children/notes fields - Fixed the initial filter using explicit 'children'/'notes' literals Whoops, how did this happen? - Fixed fold using default children/notes result attributes This one is a bit more excusable, self.children is easy to overlook. But not actual string literals, that's silly. --- scripts/csv.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/csv.py b/scripts/csv.py index d612a0d3..25d6f06b 100755 --- a/scripts/csv.py +++ b/scripts/csv.py @@ -1488,7 +1488,7 @@ def collect_csv(csv_paths, *, # strip and drop empty fields r_ = {k: v.strip() for k, v in r.items() - if k not in {'notes'} + if k != notes and v.strip()} # special handling for notes field if notes is not None and notes in r: @@ -1510,7 +1510,8 @@ def collect_csv(csv_paths, *, # everything came from a csv r_ = {k: str(v).strip() for k, v in r.items() - if k not in {'children', 'notes'} + if k != notes + and k != children and str(v).strip()} # special handling for children field if (children is not None @@ -1652,9 +1653,11 @@ def compile(fields_, results, object.__getattribute__(self, k), object.__getattribute__(other, k)) for k in fields} - | ({children: self.children + other.children} + | ({children: object.__getattribute__(self, children) + + object.__getattribute__(other, children)} if children is not None else {}) - | ({notes: self.notes | other.notes} + | ({notes: object.__getattribute__(self, notes) + | object.__getattribute__(other, notes)} if notes is not None else {}))) def __getattribute__(self, k):