Module: check_mk
Branch: master
Commit: 1d4a1b688803471449028ab1760c810055d41b58
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d4a1b68880347…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Aug 15 16:03:03 2014 +0200
webapi: fixed exception in host tag validation function
---
web/htdocs/wato.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index af6fc2b..b5f1469 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -16764,10 +16764,10 @@ def activate_changes():
# Checks if the given host_tags are all in known host tag groups and have a valid value
def check_host_tags(host_tags):
for key, value in host_tags.items():
- for group_name, group_descr, group_tags in configured_host_tags:
- if key == group_name:
- for name, descr, aux in group_tags:
- if name == value:
+ for group_entry in configured_host_tags:
+ if group_entry[0] == key:
+ for value_entry in group_entry[2]:
+ if value_entry[0] == value:
break
else:
raise MKUserError(None, _("Unknown host tag %s") %
html.attrencode(value))