diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py index 9b5bc91e181..3c4e0cf00d3 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py @@ -335,9 +335,9 @@ class StorageDomainModule(BaseModule): # Serach the data_center name, if it does not exists, try to search by guid. dc = search_by_name(dcs_service, self._module.params['data_center']) if dc is None: - dc = dcs_service.service(self._module.params['data_center']).get() + dc = get_entity(dcs_service.service(self._module.params['data_center'])) if dc is None: - return + return None dc_service = dcs_service.data_center_service(dc.id) return dc_service.storage_domains_service()