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: {},