Module: check_mk
Branch: master
Commit: 59fde8bd4ae16f50b78fe9ed8f9cd907fe73a6e8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=59fde8bd4ae16f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 12 16:45:29 2017 +0100
Cascading dropdown: Fixed exception when calling render_input with invalid value type
Change-Id: I354d457ed818c98e0074edf8701fef5ac4f00a9b
---
web/htdocs/valuespec.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 0f3cea0..1c3220f 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -1864,7 +1864,10 @@ class CascadingDropdown(ValueSpec):
else: # form painted the first time
if value == val \
or (type(value) == self._encoding_type and value[0] == val):
- def_val_2 = value[1]
+ if type(value) == self._encoding_type:
+ def_val_2 = value[1]
+ else:
+ def_val_2 = vs.default_value()
disp = ""
else:
def_val_2 = vs.default_value()