diff --git a/gns3server/controller/topology.py b/gns3server/controller/topology.py index df39dda7..7bf629c6 100644 --- a/gns3server/controller/topology.py +++ b/gns3server/controller/topology.py @@ -122,7 +122,7 @@ def _convert_1_3_later(topo, topo_path): "version": __version__, "auto_start": topo.get("auto_start", False), "name": topo["name"], - "project_id": topo["project_id"], + "project_id": topo.get("project_id"), "topology": { "links": [], "drawings": [], diff --git a/tests/topologies/1_0_empty/after/1_0_empty.gns3 b/tests/topologies/1_0_empty/after/1_0_empty.gns3 new file mode 100644 index 00000000..0b6c0312 --- /dev/null +++ b/tests/topologies/1_0_empty/after/1_0_empty.gns3 @@ -0,0 +1,22 @@ +{ + "version" : "ANYSTR", + "name" : "Downloads", + "topology" : { + "links" : [], + "drawings" : [], + "nodes" : [], + "computes" : [ + { + "protocol" : "http", + "name" : "Local", + "compute_id" : "local", + "port" : 8000, + "host" : "127.0.0.1" + } + ] + }, + "revision" : 5, + "project_id" : "ANYUUID", + "type" : "topology", + "auto_start" : false +} diff --git a/tests/topologies/1_0_empty/before/1_0_empty.gns3 b/tests/topologies/1_0_empty/before/1_0_empty.gns3 new file mode 100644 index 00000000..6372f285 --- /dev/null +++ b/tests/topologies/1_0_empty/before/1_0_empty.gns3 @@ -0,0 +1,16 @@ +{ + "name": "Downloads", + "resources_type": "local", + "topology": { + "servers": [ + { + "host": "127.0.0.1", + "id": 1, + "local": true, + "port": 8000 + } + ] + }, + "type": "topology", + "version": "1.0" +} \ No newline at end of file