Fix workflow activate last version (#9243)

Fix workflow activate last version being displayed when it shouldn't be.
This commit is contained in:
Raphaël Bosi
2024-12-26 16:14:04 +01:00
committed by GitHub
parent a3788dc777
commit 68d47e9543

View File

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