diff --git a/python_sdk/infrahub_sdk/node.py b/python_sdk/infrahub_sdk/node.py index 443cf3885c..fbb9dbea2e 100644 --- a/python_sdk/infrahub_sdk/node.py +++ b/python_sdk/infrahub_sdk/node.py @@ -739,8 +739,6 @@ def _generate_input_data(self, exclude_unmodified: bool = False) -> Dict[str, Di rel_schema = self._schema.get_relationship(name=item_name) if not rel_schema: continue - if rel_schema.kind in [RelationshipKind.GROUP, RelationshipKind.COMPONENT]: - continue rel: Union[RelatedNodeBase, RelationshipManagerBase] = getattr(self, item_name) diff --git a/python_sdk/tests/unit/sdk/test_node.py b/python_sdk/tests/unit/sdk/test_node.py index e4955cc04f..456961a706 100644 --- a/python_sdk/tests/unit/sdk/test_node.py +++ b/python_sdk/tests/unit/sdk/test_node.py @@ -849,6 +849,7 @@ async def test_create_input_data(client, location_schema, client_type): "type": {"value": "SITE"}, # "primary_tag": None, "tags": [], + "member_of_groups": [], } } @@ -880,6 +881,7 @@ async def test_create_input_data__with_relationships_02(client, location_schema, "type": {"value": "SITE"}, "tags": [{"id": "aaaaaa"}, {"id": "bbbb"}], "primary_tag": {"id": "pppppppp"}, + "member_of_groups": [], } } assert input_data["data"] == expected @@ -906,6 +908,7 @@ async def test_create_input_data__with_relationships_01(client, location_schema, "type": {"value": "SITE"}, "tags": [{"id": "aaaaaa"}, {"id": "bbbb"}], "primary_tag": {"id": "pppppppp"}, + "member_of_groups": [], } } @@ -1115,6 +1118,7 @@ async def test_update_input_data__with_relationships_01( "primary_tag": {"id": "gggggggg-gggg-gggg-gggg-gggggggggggg"}, "tags": [{"id": "gggggggg-gggg-gggg-gggg-gggggggggggg"}], "type": {"is_protected": True, "is_visible": True, "value": "SITE"}, + "member_of_groups": [], }, } @@ -1155,6 +1159,7 @@ async def test_update_input_data_with_relationships_02(client, location_schema, "source": "cccccccc-cccc-cccc-cccc-cccccccccccc", "value": "SITE", }, + "member_of_groups": [], }, } @@ -1180,6 +1185,7 @@ async def test_update_input_data_empty_relationship( # "primary_tag": None, "tags": [], "type": {"is_protected": True, "is_visible": True, "value": "SITE"}, + "member_of_groups": [], }, }