From 8c884e2ece254970cdc3300ce5ab80ff16ea4d34 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Sat, 15 Aug 2026 12:58:47 +0200 Subject: [PATCH] Keep unrelated firmware in core rather than nowhere An entry naming no RelatedItem was dropped from every category as soon as any other entry named one, so core lost the bmc and uefi versions. --- confluent_server/aiohmi/redfish/command.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/confluent_server/aiohmi/redfish/command.py b/confluent_server/aiohmi/redfish/command.py index 31545b1f..a7571461 100644 --- a/confluent_server/aiohmi/redfish/command.py +++ b/confluent_server/aiohmi/redfish/command.py @@ -1360,19 +1360,15 @@ class Command(object): for res in results: entries.append((self._fwcategory(res[0]), self._extract_fwinfo(res, labels))) - categorised = any(x[0] for x in entries) for fwcategory, res in entries: if res[0] is None: continue - if wantcategory: - if categorised: - if fwcategory != wantcategory: - continue - elif wantcategory != 'core': - # This platform does not say what any of its firmware - # belongs to, and an uncategorised inventory on a bmc is - # system firmware, so it can only answer for 'core' - continue + # An entry that says nothing about what it belongs to is system + # firmware, which is what firmware on a bmc is unless it points at + # something else. This holds for a whole inventory that names no + # relations and for the odd entry among ones that do. + if wantcategory and (fwcategory or 'core') != wantcategory: + continue yield res def _firmware_labels(self, results):