1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-23 23:38:21 +00:00

Fix a crash in VirtualBox vm creation

Fix #138
This commit is contained in:
Julien Duponchelle 2015-04-14 14:24:13 +02:00
parent c99998d73c
commit af942dc419

View File

@ -79,8 +79,9 @@ class VirtualBoxHandler:
yield from vm.set_ram(ram)
for name, value in request.json.items():
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
if name != "vm_id":
if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
response.set_status(201)
response.json(vm)