From 66e1f57a3d6452a52d93a0abe86b9b9d85fc92ac Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 26 May 2023 16:06:16 +0100 Subject: [PATCH] one more feature check for safety on the trigger --- packages/server/src/api/controllers/automation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/automation.ts b/packages/server/src/api/controllers/automation.ts index 79f93c3efa..be7af7b075 100644 --- a/packages/server/src/api/controllers/automation.ts +++ b/packages/server/src/api/controllers/automation.ts @@ -14,7 +14,7 @@ import { deleteEntityMetadata } from "../../utilities" import { MetadataTypes } from "../../constants" import { setTestFlag, clearTestFlag } from "../../utilities/redis" import { context, cache, events } from "@budibase/backend-core" -import { automations } from "@budibase/pro" +import { automations, features } from "@budibase/pro" import { Automation, AutomationActionStepId, @@ -266,7 +266,7 @@ export async function trigger(ctx: BBContext) { let automation = await db.get(ctx.params.id) let hasCollectStep = sdk.automations.utils.checkForCollectStep(automation) - if (hasCollectStep) { + if (hasCollectStep && (await features.isSyncAutomationsEnabled())) { const response: AutomationResults = await triggers.externalTrigger( automation, {