Pass proper params

This commit is contained in:
Adria Navarro 2024-07-25 15:36:43 +02:00
parent 62eaa11ebb
commit 297ff58b67
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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(),
})
}