Module: check_mk
Branch: master
Commit: 5ae06f54e32aaf61090ecab66e2b27682b806801
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ae06f54e32aaf…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 9 15:44:37 2012 +0100
WATO Host Tags: Fixed default value of select fields
---
web/htdocs/wato.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 8396078..1b50823 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3557,8 +3557,8 @@ class HostTagAttribute(Attribute):
else:
secondary_tags = []
choices.append(("|".join([ tagvalue ] + secondary_tags), e[1]))
- if value != "" and value == tagvalue:
- value = value + "|" + "|".join(secondary_tags)
+ if value != "" and value == tagvalue and secondary_tags:
+ value = value + "|" + "|".join(secondary_tags)
if len(choices) == 1:
html.checkbox(varname, value != "", cssclass = '',
onclick='wato_fix_visibility();', add_attr = ["tags=%s"%choices[0][0]])