mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 15:24:48 -06:00
Update netbox_zabbix_sync.py
Minor bug fix for empty Netbox to zabbix inventory field mappings.
This commit is contained in:
parent
634f4b77d5
commit
3e638c6f78
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user