mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
If a VM is already loaded, we return a VM instead of creating it twice
Partial fix for #81
This commit is contained in:
1 parent
914ea0326c
commit
66860655b9
2 files changed
+17
No files matched your search
@@ -200,6 +200,9 @@ class BaseManager:
|
||||
:param vm_id: restore a VM identifier
|
||||
"""
|
||||
|
||||
if vm_id in self._vms:
|
||||
return self._vms[vm_id]
|
||||
|
||||
project = ProjectManager.instance().get_project(project_id)
|
||||
if vm_id and isinstance(vm_id, int):
|
||||
with (yield from BaseManager._convert_lock):
|
||||
|
||||
Reference in new issue
Block a user