Module: check_mk
Branch: master
Commit: b486f47db95d11030a983603181a9f1ef536bd29
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b486f47db95d11…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 17 11:30:02 2016 +0100
Fixed exception when using set_focus on Dictionary() with specific key
---
web/htdocs/valuespec.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index f8b6f6c..28b455e 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -2975,9 +2975,9 @@ class Dictionary(ValueSpec):
if key == None:
elements[0][1].set_focus(varprefix + "_p_" + elements[0][0])
else:
- for element in elements:
- if element[0] == key:
- element[1].set_focus(varprefix + "_p_" + name)
+ for element_key, element_vs in elements:
+ if element_key == key:
+ element_vs.set_focus(varprefix + "_p_" + key)
def canonical_value(self):
return dict([