commit | 590aaa74c840d4e245af752148affa15c50ee232 | [log] [tgz] |
---|---|---|
author | Michael Dürre <michael.duerre@highstreet-technologies.com> | Tue Mar 24 09:01:10 2020 +0100 |
committer | Michael Dürre <michael.duerre@highstreet-technologies.com> | Tue Mar 24 09:01:31 2020 +0100 |
tree | 23810c297623e02ff818b95d60ac530dec4de83d | |
parent | bc9425a00d19b75b149fbbf0c4ea7345de8721d5 [diff] |
fixed inventory db entry filled null values with empty strings Issue-ID: SDNC-1132 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com> Change-Id: I3f210a52fe4aa08d18206e4faac35e19d9637f52
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 3f7e30c..4a4b332 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 @@ 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()); }