Skip to content

Commit 7551e49

Browse files
committed
1 parent fec58e0 commit 7551e49

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

infrahub_sdk/node.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,12 +725,11 @@ def get_human_friendly_id(self) -> Optional[list[str]]:
725725
if not self._schema.human_friendly_id:
726726
return None
727727

728-
# If all components of an HFID are null, we cannot identify a single node
728+
# If an HFID component is missing we assume that it is invalid and not usable for this node
729729
hfid_components = [self.get_path_value(path=item) for item in self._schema.human_friendly_id]
730-
if all(c is None for c in hfid_components):
730+
if None in hfid_components:
731731
return None
732-
733-
return [str(c) for c in hfid_components]
732+
return [str(hfid) for hfid in hfid_components]
734733

735734
def get_human_friendly_id_as_string(self, include_kind: bool = False) -> Optional[str]:
736735
hfid = self.get_human_friendly_id()

0 commit comments

Comments
 (0)