Module: check_mk
Branch: master
Commit: 37fe20df5bb9ce812566a76c739805fbfd0fa907
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=37fe20df5bb9ce…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jun 3 12:20:50 2012 +0200
Change empty value for ElementSelection from None to ""
---
web/htdocs/wato.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index b9e22dd..d73a59d 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5689,7 +5689,9 @@ class GroupSelection(ElementSelection):
# replace the title with the key if the title is empty
elements = [ (k, t and t or k) for (k, t) in this_group.items() ]
if self._no_selection:
- elements.append((None, self._no_selection))
+ # Beware: ElementSelection currently can only handle string
+ # keys, so we cannot take 'None' as a value.
+ elements.append(('', self._no_selection))
return dict(elements)