From e15d1cd3501741e53bc6f8466f7c9778346fee85 Mon Sep 17 00:00:00 2001 From: ziajka Date: Thu, 10 Aug 2017 10:02:18 +0200 Subject: [PATCH] Fixes loading project when link_id is not set (#1159) --- gns3server/controller/project.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index 6801cb01..898be945 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -748,6 +748,9 @@ class Project: node_id = node.pop("node_id", str(uuid.uuid4())) yield from self.add_node(compute, name, node_id, dump=False, **node) 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"]) if "filters" in link_data: yield from link.update_filters(link_data["filters"])