diff --git a/cutt/analysis.py b/cutt/analysis.py index 351c606..439c5f0 100644 --- a/cutt/analysis.py +++ b/cutt/analysis.py @@ -116,6 +116,7 @@ def graph_json( status_code=status.HTTP_404_NOT_FOUND, detail="no entries found" ) G = nx.DiGraph() + G.add_nodes_from([n["id"] for n in nodes]) G.add_weighted_edges_from([(e["source"], e["target"], e["size"]) for e in edges]) in_degrees = G.in_degree(weight="weight") nodes = [