From f1a74d438455ffa3a7815d6c429a895d13097433 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 25 Oct 2021 13:34:48 +0100 Subject: [PATCH] Scope view filters to table always --- packages/server/src/api/controllers/view/viewBuilder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/view/viewBuilder.js b/packages/server/src/api/controllers/view/viewBuilder.js index b0f39b2f1f..6e2e5c8527 100644 --- a/packages/server/src/api/controllers/view/viewBuilder.js +++ b/packages/server/src/api/controllers/view/viewBuilder.js @@ -126,7 +126,7 @@ function viewTemplate({ field, tableId, groupBy, filters = [], calculation }) { delete filters[0].conjunction } const parsedFilters = parseFilterExpression(filters) - const filterExpression = parsedFilters ? `&& ${parsedFilters}` : "" + const filterExpression = parsedFilters ? `&& (${parsedFilters})` : "" const emitExpression = parseEmitExpression(field, groupBy)