From cf3615bdb0309ec388a80549b4323b719f291350 Mon Sep 17 00:00:00 2001 From: Andrew Collins Date: Wed, 18 Dec 2024 11:19:59 -0600 Subject: [PATCH] Corrects aggregation query not clause Fixes #29 Signed-off-by: Andrew Collins --- fmatch/matcher.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fmatch/matcher.py b/fmatch/matcher.py index 1575aa4..9540164 100644 --- a/fmatch/matcher.py +++ b/fmatch/matcher.py @@ -230,8 +230,7 @@ def get_agg_metric_query( metric_queries = [] not_queries = [ ~Q("match", **{not_item_key: not_item_value}) - for not_item in metrics.get("not", []) - for not_item_key, not_item_value in not_item.items() + for not_item_key, not_item_value in metrics.get("not", {}).items() ] metric_queries = [ Q("match", **{metric_key: metric_value})