1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-24 15:58:08 +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) yield from vm.set_ram(ram)
for name, value in request.json.items(): for name, value in request.json.items():
if hasattr(vm, name) and getattr(vm, name) != value: if name != "vm_id":
setattr(vm, name, value) if hasattr(vm, name) and getattr(vm, name) != value:
setattr(vm, name, value)
response.set_status(201) response.set_status(201)
response.json(vm) response.json(vm)