Module: check_mk
Branch: master
Commit: 4e63fa372b0d8561f542c6ffbf9408ca41774b8a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e63fa372b0d85…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 17 13:41:30 2012 +0200
FIX: fix inheritation of contactgroups from folder to hosts
---
ChangeLog | 1 +
web/htdocs/wato.py | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7ad9b44..6daced3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,7 @@
* FIX: Removed focus of "Full name" attribute on editing a contact
* FIX: fix layout bug in ValueSpec ListOfStrings (e.g. used in
list of explicit host/services in rules)
+ * FIX: fix inheritation of contactgroups from folder to hosts
BI:
* FIX: Correct representation of (!), (!!) and (?) markers in check output
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2a25c98..a64a224 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -747,8 +747,10 @@ def save_hosts(folder = None):
# If the contact groups of the host are set to be used for the monitoring,
# we create an according rule for the folder and an according rule for
# each host that has an explicit setting for that attribute.
- use, cgs = effective.get("contactgroups", (False, []))
+ effective_folder_attributes = effective_attributes(None, folder)
+ use, cgs = effective_folder_attributes.get("contactgroups", (False, []))
if use and cgs:
+ html.debug(effective_folder_attributes)
out.write("\nhost_contactgroups.append(\n"
" ( %r, [ '/' + FOLDER_PATH + '/' ], ALL_HOSTS
))\n" % cgs)