From 5ac2e4a872790c4e21aac6587b2efd4ea268fecc 2021-03-12 21:27:17 From: Brett Smith Date: 2021-03-12 21:27:17 Subject: [PATCH] query: set() updates from most Iterables, not just Sequences. This lets it work correctly on set columns. --- diff --git a/conservancy_beancount/reports/query.py b/conservancy_beancount/reports/query.py index 7c90cccf11b5e942caf2568bf8558ae7fd459045..a5c2bdc7ed1bf09b6cf658d2d4cfbd84a7442810 100644 --- a/conservancy_beancount/reports/query.py +++ b/conservancy_beancount/reports/query.py @@ -394,7 +394,7 @@ class AggregateSet(bc_query_compile.EvalAggregator): def update(self, store: Store, context: PostingContext) -> None: """Update existing storage with new result data.""" value, = self.eval_args(context) - if isinstance(value, Sequence) and not isinstance(value, (str, tuple)): + if isinstance(value, Iterable) and not isinstance(value, (str, tuple)): store[self.handle].update(value) else: store[self.handle].add(value)