File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1493,15 +1493,15 @@ def _process_relationships(
14931493 for rel_name in self ._relationships :
14941494 rel = getattr (self , rel_name )
14951495 if rel and isinstance (rel , RelatedNodeSync ):
1496- relation = node_data ["node" ].get (rel_name )
1497- if relation .get ("node" , None ):
1496+ relation = node_data ["node" ].get (rel_name , None )
1497+ if relation and relation .get ("node" , None ):
14981498 related_node = InfrahubNodeSync .from_graphql (
14991499 client = self ._client , branch = branch , data = relation , timeout = timeout
15001500 )
15011501 related_nodes .append (related_node )
15021502 elif rel and isinstance (rel , RelationshipManagerSync ):
1503- peers = node_data ["node" ].get (rel_name )
1504- if peers :
1503+ peers = node_data ["node" ].get (rel_name , None )
1504+ if peers and peers [ "edges" ] :
15051505 for peer in peers ["edges" ]:
15061506 related_node = InfrahubNodeSync .from_graphql (
15071507 client = self ._client , branch = branch , data = peer , timeout = timeout
You can’t perform that action at this time.
0 commit comments