Module: check_mk
Branch: master
Commit: 3f5465a989db640aabd002f1e8057c5c7d4b0cd7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3f5465a989db64…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 8 11:21:09 2014 +0200
Fix exception when a visual has no context
---
web/htdocs/visuals.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index d31b991..689875b 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -898,7 +898,7 @@ def add_context_to_uri_vars(visual, only_infos=None,
only_count=False):
# Now apply the multiple context filters
for info_key in only_infos:
- for filter_name, filter_vars in visual['context'].items():
+ for filter_name, filter_vars in visual.get('context', {}).items():
if type(filter_vars) == dict: # this is a multi-context filter
# We add the filter only if *none* if its HTML variables are present on
the URL
# This important because checkbox variables are not present if the box is
not checked.