Changeset - 5ac2e4a87279
[Not reviewed]
0 1 0
Brett Smith - 3 years ago 2021-03-12 21:27:17
brettcsmith@brettcsmith.org
query: set() updates from most Iterables, not just Sequences.

This lets it work correctly on set columns.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/reports/query.py
Show inline comments
...
 
@@ -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)
0 comments (0 inline, 0 general)