Fix issue with multi-edge graphs in Json import
sk2 opened this issue · 0 comments
sk2 commented
Problem was in setting the defaults as only a single graph
for (src, dst) in graph.edges():
for (key, val) in edge_defaults.items():
if key not in graph[src][dst]:
graph[src][dst][key] = val
now sets on the data dict:
for src, dst, data in graph.edges(data=True):
for key, val in edge_defaults.items():
if key not in data:
data[key] = val
which works for both cases