From 97930ffc459281aa11c8e3fb1ffacafdc3d161be Mon Sep 17 00:00:00 2001 From: "k.kedron" Date: Tue, 3 Mar 2020 10:59:51 +0100 Subject: Fixed updating VFC Added checking that newProperty.path isn't null. Also added refreshing the returned property from the backend. Issue-ID: SDC-2800 Signed-off-by: Krystian Kedron Change-Id: I82449d04f3151b5233cd99fb919b47f6d05a83fa --- .../be/components/impl/ComponentInstanceBusinessLogic.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'catalog-be/src') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java index 51eb22d527..93e31e2ea2 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java @@ -1697,15 +1697,18 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic { } Optional capPropDefinition = getPropertyCapabilityOfChildInstance(propertyParentUniqueId, foundResourceInstance.getCapabilities()); - if(capPropDefinition.isPresent()) { + if (capPropDefinition.isPresent()) { updatedPropertyValue .bimap(updatedValue -> updateCapabilityPropFromUpdateInstProp(property, updatedValue, containerComponent, foundResourceInstance, capPropDefinition.get().getType(), capPropDefinition.get().getName()), Either::right); - } - else { - updatedPropertyValue.bimap(updatedValue -> updatePropertyOnContainerComponent(property, updatedValue, - containerComponent, foundResourceInstance), Either::right); + } else { + updatedPropertyValue.bimap( + updatedValue -> { + componentInstanceProperty.setValue(updatedValue); + return updatePropertyOnContainerComponent(property, updatedValue, + containerComponent, foundResourceInstance); + }, Either::right); updatedProperties.add(componentInstanceProperty); } } -- cgit 1.2.3-korg