Skip to content

Commit

Permalink
Merge pull request #28 from ReliefApplications/HIT-229-dashboard-filt…
Browse files Browse the repository at this point in the history
…er-doesnt-work-on-widgets-that-dont-have-the-field-to-be-filtered-from-in-its-aggregation

HIT-229 dashboard filter doesnt work on widgets that dont have the field to be filtered from in its aggregation
  • Loading branch information
matheus-relief authored Jan 30, 2024
2 parents a3077d7 + 6fd574c commit 4b9d71a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema/query/recordsAggregation.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 4b9d71a

Please sign in to comment.