mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fix crash when loading a topology without project id
This commit is contained in:
parent
7065988087
commit
03e31a2cb9
@ -122,7 +122,7 @@ def _convert_1_3_later(topo, topo_path):
|
|||||||
"version": __version__,
|
"version": __version__,
|
||||||
"auto_start": topo.get("auto_start", False),
|
"auto_start": topo.get("auto_start", False),
|
||||||
"name": topo["name"],
|
"name": topo["name"],
|
||||||
"project_id": topo["project_id"],
|
"project_id": topo.get("project_id"),
|
||||||
"topology": {
|
"topology": {
|
||||||
"links": [],
|
"links": [],
|
||||||
"drawings": [],
|
"drawings": [],
|
||||||
|
22
tests/topologies/1_0_empty/after/1_0_empty.gns3
Normal file
22
tests/topologies/1_0_empty/after/1_0_empty.gns3
Normal file
@ -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
|
||||||
|
}
|
16
tests/topologies/1_0_empty/before/1_0_empty.gns3
Normal file
16
tests/topologies/1_0_empty/before/1_0_empty.gns3
Normal file
@ -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"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user