From 3e638c6f7895bfef4f6bb4af0df7d470e1d41eb5 Mon Sep 17 00:00:00 2001 From: Raymond Kuiper Date: Wed, 10 Apr 2024 14:57:08 +0200 Subject: [PATCH] Update netbox_zabbix_sync.py Minor bug fix for empty Netbox to zabbix inventory field mappings. --- netbox_zabbix_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_zabbix_sync.py b/netbox_zabbix_sync.py index c11feb2..8b36c6a 100755 --- a/netbox_zabbix_sync.py +++ b/netbox_zabbix_sync.py @@ -408,7 +408,7 @@ class NetworkDevice(): value = nbdevice # ... and step through the dict till we find the needed value for item in field_list: - value = value[item] + value = value[item] if value else None # Check if the result is usable and expected if value and isinstance(value, int | float | str ): self.inventory[zbx_inv_field] = str(value)