Check values for vm_id and vm_names instead of keys (#3621)

pull/18777/head
Fabian von Feilitzsch 8 years ago committed by Matt Clay
parent 50deb312fe
commit 92a53a7182

@ -280,7 +280,7 @@ def main():
ret = disks_module.remove()
# If VM was passed attach/detach disks to/from the VM:
if 'vm_id' in module.params or 'vm_name' in module.params and state != 'absent':
if module.params.get('vm_id') is not None or module.params.get('vm_name') is not None and state != 'absent':
vms_service = connection.system_service().vms_service()
# If `vm_id` isn't specified, find VM by name:

Loading…
Cancel
Save