Fix invalid PCIeType in pcie_slots

When the Generation field of a PCIeSlot object in D-Bus is set to
"xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Unknown",
pcie_slots was returning an invalid PCIeType of "false". This caused
the Redfish validator to fail. To resolve this, the code has been
updated to not return the PCIeType if the Generation field is empty
or unknown.

Tested: Validator passed
'''
busctl get-property -j xyz.openbmc_project.Inventory.Manager \
/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/nvme0 \
xyz.openbmc_project.Inventory.Item.PCIeSlot Generation
{
        "type" : "s",
        "data" : "xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Unknown"
}

curl -k https://$bmc/redfish/v1/Chassis/chassis/PCIeSlots
{
  "@odata.id": "/redfish/v1/Chassis/chassis/PCIeSlots",
  "@odata.type": "#PCIeSlots.v1_4_1.PCIeSlots",
  "Id": "1",
  "Name": "PCIe Slot Information",
  "Slots": [
    {
      "HotPluggable": false,
      "Lanes": 0,
      "SlotType": "U2"
    },
.....
}

busctl set-property  xyz.openbmc_project.Inventory.Manager \
/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/nvme0 \
xyz.openbmc_project.Inventory.Item.PCIeSlot Generation s \
xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Gen1

curl -k https://$bmc/redfish/v1/Chassis/chassis/PCIeSlots
{
  "@odata.id": "/redfish/v1/Chassis/chassis/PCIeSlots",
  "@odata.type": "#PCIeSlots.v1_4_1.PCIeSlots",
  "Id": "1",
  "Name": "PCIe Slot Information",
  "Slots": [
    {
      "HotPluggable": false,
      "Lanes": 0,
      "PCIeType": "Gen1",
      "SlotType": "U2"
    },
....
}
'''

Change-Id: I143ce7e90cf24447a667a09d946e42f00c091a64
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
diff --git a/redfish-core/lib/pcie_slots.hpp b/redfish-core/lib/pcie_slots.hpp
index b588ac0..18301bf 100644
--- a/redfish-core/lib/pcie_slots.hpp
+++ b/redfish-core/lib/pcie_slots.hpp
@@ -119,7 +119,10 @@
             messages::internalError(asyncResp->res);
             return;
         }
-        slot["PCIeType"] = !pcieType;
+        if (*pcieType != pcie_device::PCIeTypes::Invalid)
+        {
+            slot["PCIeType"] = *pcieType;
+        }
     }
 
     if (lanes != nullptr)