Module: check_mk
Branch: master
Commit: f6634acd8d74806cbfcd33bd32c208051f3e5aea
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f6634acd8d7480…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 16 11:40:04 2016 +0100
Fix handling of fallback contacts, add missing dict key "name"
Change-Id: I8a79bebcb1993c0616758cafd7d87e7bbdb15f08
---
modules/notify.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/notify.py b/modules/notify.py
index c35b0e3..8672056 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -492,9 +492,13 @@ def rbn_fallback_contacts():
if notification_fallback_email:
fallback_contacts.append(rbn_fake_email_contact(notification_fallback_email))
- for contact in contacts.values():
+ for contact_name, contact in contacts.items():
if contact.get("fallback_contact", False) and
contact.get("email"):
- fallback_contacts.append(contact)
+ fallback_contact = {
+ "name" : contact_name,
+ }
+ fallback_contact.update(contact)
+ fallback_contacts.append(fallback_contact)
return fallback_contacts