Module: check_mk
Branch: master
Commit: 854c47607cf10fe1adffe69aa5b4307197a388d0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=854c47607cf10f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 7 20:36:31 2011 +0100
WATO: fix selection of empty tag
---
.bugs/481 | 10 +++++++---
web/htdocs/wato.py | 2 ++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/.bugs/481 b/.bugs/481
index ad05856..d43b2b2 100644
--- a/.bugs/481
+++ b/.bugs/481
@@ -1,11 +1,15 @@
Title: Tag group with empty tag does not show default
Component: wato
-Benefit: 1
-State: open
Cost: 1
Date: 2011-12-06 12:26:37
-Targetversion: 1.2.0
+State: done
Class: bug
+Benefit: 1
+Fun: 0
+Targetversion: 1.2.0
If a tag group has an empty tag then that choice is not
being shown in the combo box.
+
+2011-12-07 20:36:48: changed state open -> done
+fixed.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2ec191e..d0a4e9b 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3442,6 +3442,8 @@ class HostTagAttribute(Attribute):
# But case could occur if tags definitions have been changed.
def render_input(self, value):
+ if value == None:
+ value = "" # Important for tag groups with an empty tag entry
# Tag groups with just one entry are being displayed
# as checkboxes
choices = []