VMware: Add check for custom attribute type before removal (#53632)
This commit is contained in:
parent
ac07c6b5e6
commit
73faa376ad
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ class VmAttributeDefManager(PyVmomi):
|
|||
changed = False
|
||||
f = dict()
|
||||
for x in self.custom_field_mgr:
|
||||
if x.name == field:
|
||||
if x.name == field and x.managedObjectType == vim.VirtualMachine:
|
||||
changed = True
|
||||
if not self.module.check_mode:
|
||||
self.content.customFieldsManager.RemoveCustomFieldDef(key=x.key)
|
||||
|
|
Loading…
Reference in a new issue