diff options
-rw-r--r-- | cloud/ovirt/ovirt_disks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloud/ovirt/ovirt_disks.py b/cloud/ovirt/ovirt_disks.py index 092fb051..f354c7a6 100644 --- a/cloud/ovirt/ovirt_disks.py +++ b/cloud/ovirt/ovirt_disks.py @@ -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: |