diff --git a/backend/src/appenlight/models/services/report_stat.py b/backend/src/appenlight/models/services/report_stat.py index 0289d22..d536e23 100644 --- a/backend/src/appenlight/models/services/report_stat.py +++ b/backend/src/appenlight/models/services/report_stat.py @@ -33,10 +33,12 @@ class ReportStatService(BaseService): "aggs": { "sub_agg": {"value_count": {"field": "tags.group_id.values"}} }, - "filter": [ - {"terms": {"resource_id": [resource_id]}}, - {"exists": {"field": "tags.group_id.values"}}, - ], + "filter": { + "and": [ + {"terms": {"resource_id": [resource_id]}}, + {"exists": {"field": "tags.group_id.values"}}, + ] + }, } }, "query": {