Skip to content

Commit 737097c

Browse files
committed
fix: Skip edges without from/to values (eg, VPN)
1 parent 6d21738 commit 737097c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

modulestf/cloudcraft/graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def populate_graph(data): # noqa: C901
3838
# EDGES
3939
########
4040
for edge in data_edges:
41-
G.add_edge(edge["from"], edge["to"])
41+
if "from" in edge and "to" in edge:
42+
G.add_edge(edge["from"], edge["to"])
4243

4344
#####################
4445
# AUTOSCALING GROUPS, SECURITY GROUPS AND VPCS

0 commit comments

Comments
 (0)