mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Do not reload a project via /load if the project is already opened
Fix #785
This commit is contained in:
2 files changed
+78
-20
No files matched your search
@@ -363,9 +363,9 @@ class Controller:
|
||||
topo_data.pop("type")
|
||||
|
||||
if topo_data["project_id"] in self._projects:
|
||||
self.remove_project(self._projects[topo_data["project_id"]])
|
||||
|
||||
project = yield from self.add_project(path=os.path.dirname(path), status="closed", filename=os.path.basename(path), **topo_data)
|
||||
project = self._projects[topo_data["project_id"]]
|
||||
else:
|
||||
project = yield from self.add_project(path=os.path.dirname(path), status="closed", filename=os.path.basename(path), **topo_data)
|
||||
if load or project.auto_open:
|
||||
yield from project.open()
|
||||
return project
|
||||
|
||||
Reference in new issue
Block a user