Skip to content

Commit

Permalink
fix(deviceManageemntInventory): fixed handling of 'null' state for a …
Browse files Browse the repository at this point in the history
…InventoryContainer

Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
  • Loading branch information
Coduz committed Feb 1, 2024
1 parent 356ab27 commit 53c3feb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ protected DeviceInventoryContainers translate(KuraInventoryContainers kuraInvent
LOG.warn("Unrecognised KuraInventoryContainer.state '{}' received. Defaulting to UNKNOWN state for DeviceInventoryContainer {}", kuraInventoryContainer.getState(), deviceInventoryContainer.getName(), iae);
deviceInventoryContainer.setState(DeviceInventoryContainerState.UNKNOWN);
}
} else {
LOG.warn("Property KuraInventoryContainer.state '{}' not present. Defaulting to UNKNOWN state for DeviceInventoryContainer {}", kuraInventoryContainer.getState(), deviceInventoryContainer.getName());
deviceInventoryContainer.setState(DeviceInventoryContainerState.UNKNOWN);
}

deviceInventoryContainers.addInventoryContainer(deviceInventoryContainer);
Expand Down

0 comments on commit 53c3feb

Please sign in to comment.