From 0b1a1c4c3c2507ad776c48f5680bd7d30f5508b4 Mon Sep 17 00:00:00 2001 From: Christopher Creighton Date: Tue, 25 Sep 2012 18:42:53 -0700 Subject: [PATCH] Prevent call to create_notification if notification service has not been configured. --- app/models/notice_observer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/notice_observer.rb b/app/models/notice_observer.rb index 2fbb5ea..9dc211d 100644 --- a/app/models/notice_observer.rb +++ b/app/models/notice_observer.rb @@ -5,7 +5,7 @@ class NoticeObserver < Mongoid::Observer return unless should_notify? notice # if the app has a notficiation service, fire it off - unless notice.app.notification_service.nil? + if notice.app.notification_service_configured? notice.app.notification_service.create_notification(notice.problem) end -- libgit2 0.21.2