From d20592e885147bc3e7eda8583f7b40c148239503 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 13 Dec 2024 17:33:40 +0000 Subject: [PATCH] Updating query row API to correctly state successful if not returning an error. --- packages/server/src/automations/steps/queryRows.ts | 2 +- packages/server/src/automations/tests/queryRows.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/automations/steps/queryRows.ts b/packages/server/src/automations/steps/queryRows.ts index 923f2efd8b..93ca8a3f33 100644 --- a/packages/server/src/automations/steps/queryRows.ts +++ b/packages/server/src/automations/steps/queryRows.ts @@ -152,7 +152,7 @@ export async function run({ return { rows, - success: !!ctx.body.rows, + success: true, } } catch (err) { return { diff --git a/packages/server/src/automations/tests/queryRows.spec.ts b/packages/server/src/automations/tests/queryRows.spec.ts index 18d2e2d6cd..21e28673f3 100644 --- a/packages/server/src/automations/tests/queryRows.spec.ts +++ b/packages/server/src/automations/tests/queryRows.spec.ts @@ -96,7 +96,7 @@ describe("Test a query step automation", () => { ) .run() - expect(result.steps[0].outputs.success).toBe(false) + expect(result.steps[0].outputs.success).toBe(true) expect(result.steps[0].outputs.rows).toBeDefined() expect(result.steps[0].outputs.rows.length).toBe(0) }) @@ -125,7 +125,7 @@ describe("Test a query step automation", () => { ) .run() - expect(result.steps[0].outputs.success).toBe(false) + expect(result.steps[0].outputs.success).toBe(true) expect(result.steps[0].outputs.rows).toBeDefined() expect(result.steps[0].outputs.rows.length).toBe(0) })