Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions infrahub_sdk/node/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1493,15 +1493,15 @@
for rel_name in self._relationships:
rel = getattr(self, rel_name)
if rel and isinstance(rel, RelatedNodeSync):
relation = node_data["node"].get(rel_name)
if relation.get("node", None):
relation = node_data["node"].get(rel_name, None)

Check warning on line 1496 in infrahub_sdk/node/node.py

View check run for this annotation

Codecov / codecov/patch

infrahub_sdk/node/node.py#L1496

Added line #L1496 was not covered by tests
if relation and relation.get("node", None):
related_node = InfrahubNodeSync.from_graphql(
client=self._client, branch=branch, data=relation, timeout=timeout
)
related_nodes.append(related_node)
elif rel and isinstance(rel, RelationshipManagerSync):
peers = node_data["node"].get(rel_name)
if peers:
peers = node_data["node"].get(rel_name, None)

Check warning on line 1503 in infrahub_sdk/node/node.py

View check run for this annotation

Codecov / codecov/patch

infrahub_sdk/node/node.py#L1503

Added line #L1503 was not covered by tests
if peers and peers["edges"]:
for peer in peers["edges"]:
related_node = InfrahubNodeSync.from_graphql(
client=self._client, branch=branch, data=peer, timeout=timeout
Expand Down