fixed zabbix no longer returning macros as part of the template (#66996)

This commit is contained in:
Dusan Matejka 2020-02-10 08:09:00 +01:00 committed by GitHub
parent 1110e9d80d
commit c80d0c40ce

View file

@ -425,6 +425,9 @@ class Template(object):
changed = True changed = True
break break
if 'macros' not in existing_template['zabbix_export']['templates'][0]:
existing_template['zabbix_export']['templates'][0]['macros'] = []
if template_macros is not None: if template_macros is not None:
existing_macros = existing_template['zabbix_export']['templates'][0]['macros'] existing_macros = existing_template['zabbix_export']['templates'][0]['macros']
if template_macros != existing_macros: if template_macros != existing_macros: