Strorage can be also created from host screen - in that case code

throws exception in part where vdi was to be attached to vm.  This
change assures that reference is there only if VM is selected.
This commit is contained in:
izderadicka 2014-09-15 19:08:46 +02:00
parent 3df62f7892
commit 4bbc3dd4ee
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ class oxcWindowVMStorage:
# Add new disk with the selected options (size, name, description..)
self.xc_servers[self.selected_host].add_disk_to_vm(
name, description, sr, virtual_size, self.selected_uuid,
self.selected_ref)
self.selected_ref if self.selected_type=='vm' else None)
self.builder.get_object("vmaddnewdisk").hide()