mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-17 01:04:51 +02:00
Merge pull request #1161 from GNS3/empty-link-on-compute
Fixes loading project when link_id is not set (#1159)
This commit is contained in:
commit
3dd5dbe0c1
@ -748,6 +748,9 @@ class Project:
|
|||||||
node_id = node.pop("node_id", str(uuid.uuid4()))
|
node_id = node.pop("node_id", str(uuid.uuid4()))
|
||||||
yield from self.add_node(compute, name, node_id, dump=False, **node)
|
yield from self.add_node(compute, name, node_id, dump=False, **node)
|
||||||
for link_data in topology.get("links", []):
|
for link_data in topology.get("links", []):
|
||||||
|
if 'link_id' not in link_data.keys():
|
||||||
|
# skip the link
|
||||||
|
continue
|
||||||
link = yield from self.add_link(link_id=link_data["link_id"])
|
link = yield from self.add_link(link_id=link_data["link_id"])
|
||||||
if "filters" in link_data:
|
if "filters" in link_data:
|
||||||
yield from link.update_filters(link_data["filters"])
|
yield from link.update_filters(link_data["filters"])
|
||||||
|
Loading…
Reference in New Issue
Block a user