1
0
Fork 0
mirror of synced 2024-09-08 21:51:58 +12:00

one more feature check for safety on the trigger

This commit is contained in:
Peter Clement 2023-05-26 16:06:16 +01:00
parent 221d03c153
commit 66e1f57a3d

View file

@ -14,7 +14,7 @@ import { deleteEntityMetadata } from "../../utilities"
import { MetadataTypes } from "../../constants" import { MetadataTypes } from "../../constants"
import { setTestFlag, clearTestFlag } from "../../utilities/redis" import { setTestFlag, clearTestFlag } from "../../utilities/redis"
import { context, cache, events } from "@budibase/backend-core" import { context, cache, events } from "@budibase/backend-core"
import { automations } from "@budibase/pro" import { automations, features } from "@budibase/pro"
import { import {
Automation, Automation,
AutomationActionStepId, AutomationActionStepId,
@ -266,7 +266,7 @@ export async function trigger(ctx: BBContext) {
let automation = await db.get(ctx.params.id) let automation = await db.get(ctx.params.id)
let hasCollectStep = sdk.automations.utils.checkForCollectStep(automation) let hasCollectStep = sdk.automations.utils.checkForCollectStep(automation)
if (hasCollectStep) { if (hasCollectStep && (await features.isSyncAutomationsEnabled())) {
const response: AutomationResults = await triggers.externalTrigger( const response: AutomationResults = await triggers.externalTrigger(
automation, automation,
{ {