From edcb27b052eb0172d27abb503fd590d27687b93c Mon Sep 17 00:00:00 2001 From: Tom Paine Date: Wed, 21 Aug 2024 14:37:51 +0100 Subject: [PATCH] fix attribute test --- plugins/inventory/opennebula.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/opennebula.py b/plugins/inventory/opennebula.py index 11b5bfc297..34e9df311a 100644 --- a/plugins/inventory/opennebula.py +++ b/plugins/inventory/opennebula.py @@ -200,7 +200,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable): server['name'] = vm.NAME server['id'] = vm.ID - if vm.HISTORY_RECORDS.HISTORY[-1]: + if vm.HISTORY_RECORDS.HISTORY: server['host'] = vm.HISTORY_RECORDS.HISTORY[-1].HOSTNAME server['LABELS'] = labels server['v4_first_ip'] = self._get_vm_ipv4(vm)