F #4913: Fix instantiated_as_persistent to deal with VMs that has no DEPLOY_ID yet

This commit is contained in:
mcabrerizo committed 2017-04-26 13:55:57 +02:00
1 parent 9d207be128
commit e336d8fcb0
1 file changed
+5 -1
@@ -2279,7 +2279,11 @@ class VirtualMachine < Template
end
def instantiated_as_persistent?
!!one_item["TEMPLATE/CLONING_TEMPLATE_ID"]
begin
!!one_item["TEMPLATE/CLONING_TEMPLATE_ID"]
rescue
return false #one_item may not be retrieved if deploy_id hasn't been set
end
end
def remove_poweroff_detached_vcenter_nets(networks)