Module: check_mk
Branch: master
Commit: 33a018be9f03f7282f275ff0db66e260402f465d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=33a018be9f03f7…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Mar 5 10:38:40 2018 +0100
5784 FIX WATO Web-API: fixed broken update of host tags
The updating of host tags was no longer working due the recent changes in the host
datasource management.
Change-Id: If3b9c92527b1ec3766089b2d87e363a564af3995
---
.werks/5784 | 10 ++++++++++
web/plugins/webapi/webapi.py | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/5784 b/.werks/5784
new file mode 100644
index 0000000..97e77ac
--- /dev/null
+++ b/.werks/5784
@@ -0,0 +1,10 @@
+Title: WATO Web-API: fixed broken update of host tags
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i4
+Date: 1520242609
+Class: fix
+
+The updating of host tags was no longer working due the recent changes in the host
datasource management.
diff --git a/web/plugins/webapi/webapi.py b/web/plugins/webapi/webapi.py
index 34e2e42..7f52dfe 100644
--- a/web/plugins/webapi/webapi.py
+++ b/web/plugins/webapi/webapi.py
@@ -838,7 +838,9 @@ class APICallHosttags(APICallCollection):
new_tags.update(changed_hosttags_config.get_tag_ids_with_group_prefix())
# Remove the builtin hoststags from the list of used_tags
- for tag_group_id, tag_group__title, tags in watolib.builtin_host_tags:
+ for builtin_tag_group in watolib.builtin_host_tags:
+ tag_group_id = builtin_tag_group[0]
+ tags = builtin_tag_group[2]
for tag_id, tag_title, aux_tags in tags:
used_tags.discard("%s/%s" % (tag_group_id, tag_id))
used_tags.discard(tag_id)