Module: check_mk
Branch: master
Commit: d3ec484efd66f9339dbf850c3ab2128a312bb91d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d3ec484efd66f9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 22 12:44:34 2017 +0100
Fixed possible exception when visuals use an integer as single info key
(recently introduced error)
Change-Id: I920b9c6d3f664825365f4ff8568e49d8d3ee7d3b
---
web/htdocs/visuals.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 3c18941..e62fb37 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -1055,7 +1055,7 @@ def add_context_to_uri_vars(visual, only_infos=None,
only_count=False):
# filter vars in "multiple" context are not enforced.
for key in get_single_info_keys(visual):
if key in visual['context']:
- html.set_var(key, visual['context'][key])
+ html.set_var(key, "%s" % visual['context'][key])
# Now apply the multiple context filters
for info_key in only_infos:
@@ -1070,7 +1070,7 @@ def add_context_to_uri_vars(visual, only_infos=None,
only_count=False):
break
if not skip or only_count:
for uri_varname, value in filter_vars.items():
- html.set_var(uri_varname, value)
+ html.set_var(uri_varname, "%s" % value)
# Vice versa: find all filters that belong to the current URI variables
# and create a context dictionary from that.