Fix regression in pid setting

It looks like one of the patchset merge conflicts got rebased poorly (ie
commented out).  In the meantime, a number of these structures have gone
from map->vector, so modify the algorithm to account for that.

Tested:
1. Redfish validator - passed with this change.
2. Verified from Redfish by patching "StepwiseControllers" sensors.

Signed-off-by: Ed Tanous <edtanous@google.com>
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I89d36f1b0b3699b6bf07a17af029e5a2504c85de
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index b8fe156..f934fd6 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -1530,38 +1530,37 @@
                 BMCWEB_LOG_DEBUG << "Found = " << !createNewObject;
 
                 std::string iface;
-                /*
-                if (type == "PidControllers" || type == "FanControllers")
+                if (!createNewObject)
                 {
-                    iface = pidConfigurationIface;
-                    if (!createNewObject &&
-                        pathItr->second.find(pidConfigurationIface) ==
-                            pathItr->second.end())
+                    for (const auto& interface : pathItr->second)
                     {
-                        createNewObject = true;
+                        if (interface.first == pidConfigurationIface)
+                        {
+                            if (type == "PidControllers" ||
+                                type == "FanControllers")
+                            {
+                                iface = pidConfigurationIface;
+                                createNewObject = true;
+                            }
+                        }
+                        else if (interface.first == pidZoneConfigurationIface)
+                        {
+                            if (type == "FanZones")
+                            {
+                                iface = pidConfigurationIface;
+                                createNewObject = true;
+                            }
+                        }
+                        else if (interface.first == stepwiseConfigurationIface)
+                        {
+                            if (type == "StepwiseControllers")
+                            {
+                                iface = stepwiseConfigurationIface;
+                                createNewObject = true;
+                            }
+                        }
                     }
                 }
-                else if (type == "FanZones")
-                {
-                    iface = pidZoneConfigurationIface;
-                    if (!createNewObject &&
-                        pathItr->second.find(pidZoneConfigurationIface) ==
-                            pathItr->second.end())
-                    {
-
-                        createNewObject = true;
-                    }
-                }
-                else if (type == "StepwiseControllers")
-                {
-                    iface = stepwiseConfigurationIface;
-                    if (!createNewObject &&
-                        pathItr->second.find(stepwiseConfigurationIface) ==
-                            pathItr->second.end())
-                    {
-                        createNewObject = true;
-                    }
-                }*/
 
                 if (createNewObject && it.value() == nullptr)
                 {