Skip to content

Commit e188689

Browse files
committed
Fix hierarchy support validation in InfrahubNode and InfrahubNodeSync
1 parent 2191f4e commit e188689

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

infrahub_sdk/node/node.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,8 @@ async def _process_hierarchical_fields(
736736
property: bool = False,
737737
) -> None:
738738
"""Process hierarchical fields (parent, children, ancestors, descendants) for hierarchical nodes."""
739-
self._validate_hierarchy_support(HIERARCHY_FETCH_FEATURE_NOT_SUPPORTED_MESSAGE)
739+
if not self._hierarchy_support:
740+
return
740741

741742
for hierarchical_name in ["parent", "children", "ancestors", "descendants"]:
742743
if exclude and hierarchical_name in exclude:
@@ -1499,7 +1500,8 @@ def _process_hierarchical_fields(
14991500
property: bool = False,
15001501
) -> None:
15011502
"""Process hierarchical fields (parent, children, ancestors, descendants) for hierarchical nodes."""
1502-
self._validate_hierarchy_support(HIERARCHY_FETCH_FEATURE_NOT_SUPPORTED_MESSAGE)
1503+
if not self._hierarchy_support:
1504+
return
15031505

15041506
for hierarchical_name in ["parent", "children", "ancestors", "descendants"]:
15051507
if exclude and hierarchical_name in exclude:

0 commit comments

Comments
 (0)