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})