Module: check_mk
Branch: master
Commit: 5e77fe9c5842b583628ce1ec6da8216c0cda016d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5e77fe9c5842b5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu May 24 09:41:23 2012 +0200
FIX: Detecting duplicate tag ids between regular tags and auxtags
---
ChangeLog | 1 +
web/htdocs/wato.py | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fd1ad12..6b8c213 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
1.2.0b5:
WATO:
* FIX: fix folding problems with dependent host tags
+ * FIX: Detecting duplicate tag ids between regular tags and auxtags
Multisite:
* FIX: remove refresh button from dashboard.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 05f0192..3fa36ab 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8620,6 +8620,7 @@ def mode_edit_hosttag(phase):
tgid = entry[0]
tit = entry[1]
ch = entry[2]
+ # Do not compare the taggroup with itselfs
if tgid != tag_id:
for e in ch:
# Check primary and secondary tags
@@ -8629,7 +8630,12 @@ def mode_edit_hosttag(phase):
"'%s' in the tag group
'%s'.") %
( id, e[1], tit ))
-
+ # Also check all defined aux tags even if they are not used anywhere
+ for tag, descr in auxtags:
+ if id == tag:
+ raise MKUserError("choices_id_%d" % (nr+1),
+ _("The tag ID '%s' is already being used as
auxiliary tag.") % id)
+
if len(new_choices) == 0:
raise MKUserError("id_0", _("Please specify at least on
tag."))
if len(new_choices) == 1 and new_choices[0][0] == None: