diff options
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js index efc4fb758f..e9d922c212 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js @@ -83,21 +83,13 @@ export default { saveLicenseAgreement(dispatch, {licenseModelId, previousLicenseAgreement, licenseAgreement, version}) { if (previousLicenseAgreement) { return putLicenseAgreement(licenseModelId, previousLicenseAgreement, licenseAgreement, version).then(() => { - dispatch({ - type: licenseAgreementActionTypes.EDIT_LICENSE_AGREEMENT, - licenseAgreement - }); + this.fetchLicenseAgreementList(dispatch, {licenseModelId, version}); }); } else { - return postLicenseAgreement(licenseModelId, licenseAgreement, version).then(response => { - dispatch({ - type: licenseAgreementActionTypes.ADD_LICENSE_AGREEMENT, - licenseAgreement: { - ...licenseAgreement, - id: response.value - } - }); + return postLicenseAgreement(licenseModelId, licenseAgreement, version).then(() => { + this.fetchLicenseAgreementList(dispatch, {licenseModelId, version}); + FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, {licenseModelId, version}); }); } }, |