From 25571d7751fefca8ba27d437e237c91efa47199f Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 10 Aug 2022 16:26:10 +0100 Subject: [PATCH] pr comments --- packages/server/src/automations/steps/queryRows.js | 3 ++- packages/server/src/automations/tests/queryRows.spec.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/automations/steps/queryRows.js b/packages/server/src/automations/steps/queryRows.js index 6cd1640b76..b02f31b1ec 100644 --- a/packages/server/src/automations/steps/queryRows.js +++ b/packages/server/src/automations/steps/queryRows.js @@ -120,7 +120,8 @@ function typeCoercion(filters, table) { } const hasNullFilters = filters => - filters.length === 0 || filters.some(filter => filter.value === null) + filters.length === 0 || + filters.some(filter => filter.value === null || filter.value === "") exports.run = async function ({ inputs, appId }) { const { tableId, filters, sortColumn, sortOrder, limit } = inputs diff --git a/packages/server/src/automations/tests/queryRows.spec.js b/packages/server/src/automations/tests/queryRows.spec.js index 091b95e685..1ce7460806 100644 --- a/packages/server/src/automations/tests/queryRows.spec.js +++ b/packages/server/src/automations/tests/queryRows.spec.js @@ -50,7 +50,6 @@ describe("Test a query step automation", () => { }) it("Returns all rows when onEmptyFilter has no value and no filters are passed", async () => { - console.log(rows) const inputs = { tableId: table._id, filters: {},