From 3a90f78ccae065a05330f3ee83d083de02718c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sat, 14 May 2016 11:07:24 +0200 Subject: [PATCH] monitoring/zabbix_host: Fix (no) proxy handling When updating a host with no proxy explicitly set, the host was always reported as changed, because it was comparing `"0"` and `None`. --- monitoring/zabbix_host.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monitoring/zabbix_host.py b/monitoring/zabbix_host.py index 70d323138c4..e6fec0b0252 100644 --- a/monitoring/zabbix_host.py +++ b/monitoring/zabbix_host.py @@ -362,8 +362,9 @@ class Host(object): if set(list(template_ids)) != set(exist_template_ids): return True - if host['proxy_hostid'] != proxy_id: - return True + if proxy_id is not None: + if host['proxy_hostid'] != proxy_id: + return True return False