Module: check_mk
Branch: master
Commit: e48edb351936fa7fbdf5261bbcdee395fac5f4cf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e48edb351936fa…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 7 16:44:14 2017 +0100
Allow also methods to be used as Dictionary() element generators
Change-Id: Iad3d8a7af26b8294fcf385d073191d165bae70c0
---
web/htdocs/valuespec.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 047d1c5..6f55971 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3388,7 +3388,7 @@ class Dictionary(ValueSpec):
return value
def _get_elements(self):
- if type(self._elements) == type(lambda: None):
+ if type(self._elements) == type(lambda: None) or isinstance(self._elements,
types.MethodType):
return self._elements()
elif type(self._elements) == list:
return self._elements