mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-12-26 15:07:44 -06:00
Removed default for hostgroups and fixed bug for hostgroup attributes which do not exist
This commit is contained in:
@@ -564,6 +564,9 @@ class PhysicalDevice:
|
||||
final_data = []
|
||||
# Check if the hostgroup is in a nested format and check each parent
|
||||
for hostgroup in self.hostgroups:
|
||||
# Check if hostgroup is string. If Nonetype skip hostgroup
|
||||
if not isinstance(hostgroup, str):
|
||||
continue
|
||||
for pos in range(len(hostgroup.split("/"))):
|
||||
zabbix_hg = hostgroup.rsplit("/", pos)[0]
|
||||
if self.lookupZabbixHostgroup(hostgroups, zabbix_hg):
|
||||
|
||||
Reference in New Issue
Block a user