From 590aaa74c840d4e245af752148affa15c50ee232 Mon Sep 17 00:00:00 2001 From: Michael Dürre Date: Tue, 24 Mar 2020 09:01:10 +0100 Subject: fixed inventory db entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit filled null values with empty strings Issue-ID: SDNC-1132 Signed-off-by: Michael Dürre Change-Id: I3f210a52fe4aa08d18206e4faac35e19d9637f52 --- .../sdnr/wt/dataprovider/data/HtDatabaseEventsService.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sdnr') diff --git a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/HtDatabaseEventsService.java b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/HtDatabaseEventsService.java index 3f7e30c22..4a4b332d6 100644 --- a/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/HtDatabaseEventsService.java +++ b/sdnr/wt/data-provider/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/dataprovider/data/HtDatabaseEventsService.java @@ -256,6 +256,13 @@ public class HtDatabaseEventsService implements ArchiveCleanProvider, DataProvid if (assertIfClientNullForNodeName(internalEquipment.getNodeId())) { return; } + if(internalEquipment.getManufacturerIdentifier()==null) { + internalEquipment = new InventoryBuilder(internalEquipment).setManufacturerIdentifier("").build(); + } + if(internalEquipment.getDate()==null) { + internalEquipment = new InventoryBuilder(internalEquipment).setDate("").build(); + } + eventRWEquipment.write(internalEquipment, internalEquipment.getNodeId()+"/"+internalEquipment.getUuid()); } -- cgit 1.2.3-korg