From 4daa2c33b8e333e1c0693188e5c3eabc7388ffa6 Mon Sep 17 00:00:00 2001 From: pederhan Date: Thu, 15 Aug 2024 11:06:20 +0200 Subject: [PATCH] Comments, var name --- zabbix_auto_config/processing.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/zabbix_auto_config/processing.py b/zabbix_auto_config/processing.py index c45f233..19f246c 100644 --- a/zabbix_auto_config/processing.py +++ b/zabbix_auto_config/processing.py @@ -1769,13 +1769,12 @@ def do_update(self) -> None: db_host = db_hosts[zabbix_hostname] - # Determine synced host groups for host + # Determine host groups to sync for host + # Sync host groups derived from its properties, siteadmins, sources, etc. synced_hostgroup_names = set([self.config.hostgroup_all]) - for _property in db_host.properties: - if _property in self.property_hostgroup_map: - synced_hostgroup_names.update( - self.property_hostgroup_map[_property] - ) + for prop in db_host.properties: + if prop in self.property_hostgroup_map: + synced_hostgroup_names.update(self.property_hostgroup_map[prop]) for siteadmin in db_host.siteadmins: if siteadmin in self.siteadmin_hostgroup_map: synced_hostgroup_names.update(