From: Yarin Dekel Date: Sun, 6 Jan 2019 11:47:23 +0000 (+0200) Subject: version data not saved when empty artifact X-Git-Tag: 1.4.0~10 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F33%2F75333%2F2;p=sdc%2Fsdc-workflow-designer.git version data not saved when empty artifact Issue-ID: SDC-2035 Change-Id: Ibee4d133ca29a5499f6abf90ff665915d4c1d496 Signed-off-by: Yarin Dekel --- diff --git a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js index a476b41e..cf391f33 100644 --- a/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js +++ b/workflow-designer-ui/src/main/frontend/src/features/version/versionSaga.js @@ -101,11 +101,17 @@ function* watchUpdateVersion(action) { params: { composition, ...versionData } } = action.payload; const isArtifactValid = validateCurrentArtifact(composition); + yield call(versionApi.updateVersion, { + workflowId, + params: versionData + }); + yield put( + notificationActions.showSuccess({ + title: I18n.t('workflow.confirmationMessages.updateTitle'), + message: I18n.t('workflow.confirmationMessages.updateMessage') + }) + ); if (isArtifactValid) { - yield call(versionApi.updateVersion, { - workflowId, - params: versionData - }); yield call(versionApi.updateVersionArtifact, { workflowId, workflowName, @@ -113,14 +119,6 @@ function* watchUpdateVersion(action) { versionId: versionData.id, payload: composition }); - yield put( - notificationActions.showSuccess({ - title: I18n.t('workflow.confirmationMessages.updateTitle'), - message: I18n.t( - 'workflow.confirmationMessages.updateMessage' - ) - }) - ); } else { yield call(versionApi.deleteVersionArtifact, { workflowId,