Also added backwards support for Zabbix 5

This commit is contained in:
TheNetworkGuy 2025-02-04 12:46:00 +01:00
parent 5617275594
commit 7a671d6625

View File

@ -585,7 +585,7 @@ class PhysicalDevice():
# Check if Zabbix version is 6 or higher. Issue #93 # Check if Zabbix version is 6 or higher. Issue #93
group_dictname = "hostgroups" group_dictname = "hostgroups"
if str(self.zabbix.version).startswith('6'): if str(self.zabbix.version).startswith(('6', '5')):
group_dictname = "groups" group_dictname = "groups"
for group in host[group_dictname]: for group in host[group_dictname]:
if group["groupid"] == self.group_id: if group["groupid"] == self.group_id: