From 6fd574ccc0d5e065cefe6be883c49e808acca385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Tann=C3=BAs?= <39497117+brunotannus@users.noreply.github.com> Date: Mon, 29 Jan 2024 12:57:47 -0300 Subject: [PATCH] Small correction on extractSourceFields from reference data fields --- src/schema/query/recordsAggregation.query.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/query/recordsAggregation.query.ts b/src/schema/query/recordsAggregation.query.ts index 83e7bf089..7b7eb3095 100644 --- a/src/schema/query/recordsAggregation.query.ts +++ b/src/schema/query/recordsAggregation.query.ts @@ -102,7 +102,7 @@ const extractSourceFields = ( } else if (filter.field) { if ( typeof filter.field === 'string' && - !fields.includes(filter.field) && + !fields.includes(filter.field.split('.')[0]) && allFields.concat(DEFAULT_FIELDS).includes(filter.field.split('.')[0]) ) { fields.push(filter.field.split('.')[0]);