aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java3
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java
index 21327ea29d..44fecb311b 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java
@@ -308,6 +308,9 @@ public class InputsBusinessLogic extends BaseBusinessLogic {
currInput.setDefaultValue(updateInputObjectValue);
currInput.setOwnerId(userId);
currInput.setMetadata(newInput.getMetadata());
+ if (newInput.getConstraints() != null) {
+ currInput.setConstraints(newInput.getConstraints());
+ }
if (newInput.isRequired() != null) {
currInput.setRequired(newInput.isRequired());
}
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java
index 2cccc31ded..f5db6be6bd 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java
@@ -2113,7 +2113,8 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic {
}
Service service = serviceResultEither.left().value();
if (dataParamsToReturn.contains(ComponentFieldsEnum.INPUTS.getValue())) {
- ListUtils.emptyIfNull(service.getInputs()).forEach(input -> input.setConstraints(setInputConstraint(input)));
+ ListUtils.emptyIfNull(service.getInputs()).stream().filter(input -> CollectionUtils.isEmpty(input.getConstraints()))
+ .forEach(input -> input.setConstraints(setInputConstraint(input)));
}
UiComponentDataTransfer dataTransfer = uiComponentDataConverter.getUiDataTransferFromServiceByParams(service, dataParamsToReturn);
return Either.left(dataTransfer);