Skip to content

Commit

Permalink
Updating query row API to correctly state successful if not returning…
Browse files Browse the repository at this point in the history
… an error.
  • Loading branch information
mike12345567 committed Dec 13, 2024
1 parent b58aa80 commit d20592e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/server/src/automations/steps/queryRows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export async function run({

return {
rows,
success: !!ctx.body.rows,
success: true,
}
} catch (err) {
return {
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/automations/tests/queryRows.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down Expand Up @@ -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)
})
Expand Down

0 comments on commit d20592e

Please sign in to comment.