Module: check_mk
Branch: master
Commit: 9248a31e636884de422d6da1029f7f99deb1984e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9248a31e636884…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 14 10:25:52 2013 +0200
Only apply foldertree reduce when folder is empty
---
web/plugins/sidebar/wato.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/plugins/sidebar/wato.py b/web/plugins/sidebar/wato.py
index 3cd3f66..d404f28 100644
--- a/web/plugins/sidebar/wato.py
+++ b/web/plugins/sidebar/wato.py
@@ -200,7 +200,7 @@ def render_wato_foldertree():
# top level
def reduce_tree(folders):
for folder_path, folder in folders.items():
- if len(folder['.folders']) == 1:
+ if len(folder['.folders']) == 1 and folder['.num_hosts'] ==
0:
child_path, child_folder = folder['.folders'].items()[0]
folders[child_path] = child_folder
del folders[folder_path]