diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/workflow-actions/hooks/useActivateLastPublishedVersionWorkflowSingleRecordAction.ts b/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/workflow-actions/hooks/useActivateLastPublishedVersionWorkflowSingleRecordAction.ts index 32f84f673..0c68e1a62 100644 --- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/workflow-actions/hooks/useActivateLastPublishedVersionWorkflowSingleRecordAction.ts +++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/workflow-actions/hooks/useActivateLastPublishedVersionWorkflowSingleRecordAction.ts @@ -13,7 +13,8 @@ export const useActivateLastPublishedVersionWorkflowSingleRecordAction: SingleRe isDefined(workflowWithCurrentVersion) && isDefined(workflowWithCurrentVersion.currentVersion.trigger) && isDefined(workflowWithCurrentVersion.lastPublishedVersionId) && - workflowWithCurrentVersion.currentVersion.status !== 'ACTIVE' && + workflowWithCurrentVersion.lastPublishedVersionId !== '' && + !workflowWithCurrentVersion.statuses?.includes('ACTIVE') && isDefined(workflowWithCurrentVersion.currentVersion?.steps) && workflowWithCurrentVersion.currentVersion?.steps.length !== 0;