version: Check Chassis changed for Delete intf

The chassis path contains multiple properties. The code checks for
chassis state to decide if the Delete interface is added or removed.
If a different property was modified, the chassis state would be
empty, leading to always removing the Delete interface in this
scenario. Check that chassis state was populated before modifying the
Delete interface.

Tested: Verified the Delete interface was added back during power off.

Change-Id: Iee32de8917930e2f9081ab369ad4998766f21cff
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/version.cpp b/version.cpp
index 23f90f4..150d031 100644
--- a/version.cpp
+++ b/version.cpp
@@ -115,6 +115,11 @@
             chassisState = p.second.get<std::string>();
         }
     }
+    if (chassisState.empty())
+    {
+        // The chassis power state property did not change, return.
+        return;
+    }
 
     if ((parent.isVersionFunctional(this->versionId)) &&
         (chassisState != CHASSIS_STATE_OFF))