Skip to content

Commit

Permalink
Pass proper params
Browse files Browse the repository at this point in the history
  • Loading branch information
adrinr committed Jul 25, 2024
1 parent 62eaa11 commit 297ff58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 1 addition & 4 deletions packages/server/src/automations/triggers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,7 @@ export async function externalTrigger(
throw new Error("Automation is disabled")
}
if (
automation.definition != null &&
automation.definition.trigger != null &&
automation.definition.trigger.stepId === definitions.APP.stepId &&
automation.definition.trigger.stepId === "APP" &&
automation.definition?.trigger?.stepId === definitions.APP.stepId &&
!(await checkTestFlag(automation._id!))
) {
// values are likely to be submitted as strings, so we shall convert to correct type
Expand Down
3 changes: 2 additions & 1 deletion packages/server/src/sdk/app/rowActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ export async function run(tableId: any, rowActionId: any, rowId: string) {

const row = await sdk.rows.find(tableId, rowId)
await triggers.externalTrigger(automation, {
fields: { row, table },
row,
table,
appId: context.getAppId(),
})
}

0 comments on commit 297ff58

Please sign in to comment.