summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redfish-core/lib/sensors.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index ef3354d980..0772da559f 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -2185,7 +2185,8 @@ inline nlohmann::json& getPowerSupply(nlohmann::json& powerSupplyArray,
// Check if matching PowerSupply object already exists in JSON array
for (nlohmann::json& powerSupply : powerSupplyArray)
{
- if (powerSupply["Name"] == inventoryItem.name)
+ if (powerSupply["Name"] ==
+ boost::replace_all_copy(inventoryItem.name, "_", " "))
{
return powerSupply;
}