aboutsummaryrefslogtreecommitdiffstats
path: root/workflow-designer-be/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'workflow-designer-be/src/main')
-rw-r--r--workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
index 0078d226..33210778 100644
--- a/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
+++ b/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
@@ -232,9 +232,10 @@ public class WorkflowVersionManagerImpl implements WorkflowVersionManager {
workflowId, versionId);
throw new VersionModificationException(workflowId, versionId);
}
-
- artifactRepository.delete(workflowId, versionId);
- versioningManager.publish(workflowId, new Version(versionId), "Delete Artifact");
+ if(retrievedVersion.isHasArtifact()) {
+ artifactRepository.delete(workflowId, versionId);
+ versioningManager.publish(workflowId, new Version(versionId), "Delete Artifact");
+ }
}
private void validateVersionExistAndCertified(String workflowId, List<Version> versions, String versionId) {