Failure to submit NFoD when backup NIC is set 07/32907/2
authorolegb <olegb@amdocs.com>
Mon, 26 Feb 2018 13:18:55 +0000 (15:18 +0200)
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>
Sun, 4 Mar 2018 09:29:38 +0000 (09:29 +0000)
Issue-ID: SDC-1062
Change-Id: I03944def6a3695dad7c866dbe1eb17b2fe5f5ae9
Signed-off-by: olegb <olegb@amdocs.com>
openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/NicDaoZusammenImpl.java

index b3f9a52..53994ef 100644 (file)
@@ -53,7 +53,7 @@ public class NicDaoZusammenImpl implements NicDao {
         .stream()
         .map(new ElementToNicConvertor()::convert)
         .map(nicEntity -> {
-          nicEntity.setComponentId(nicEntity.getComponentId());
+          nicEntity.setComponentId(nic.getComponentId());
           nicEntity.setVspId(nic.getVspId());
           nicEntity.setVersion(nic.getVersion());
           return nicEntity;
@@ -171,7 +171,10 @@ public class NicDaoZusammenImpl implements NicDao {
         .map(component ->
             listNics(context, elementContext,
                 new NicEntity(vspId, version, component.getId(), null)).stream()
-                .map(nic -> getQuestionnaire(context, elementContext, nic))
+                .map(nic -> {
+                  nic.setQuestionnaireData(getQuestionnaire(context, elementContext, nic).getQuestionnaireData());
+                  return nic;
+                })
                 .collect(Collectors.toList()))
         .flatMap(Collection::stream)
         .collect(Collectors.toList());