Commit 0b1a1c4c3c2507ad776c48f5680bd7d30f5508b4
1 parent
0a43e83b
Exists in
master
and in
1 other branch
Prevent call to create_notification if notification service has not been configured.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/notice_observer.rb
@@ -5,7 +5,7 @@ class NoticeObserver < Mongoid::Observer | @@ -5,7 +5,7 @@ class NoticeObserver < Mongoid::Observer | ||
5 | return unless should_notify? notice | 5 | return unless should_notify? notice |
6 | 6 | ||
7 | # if the app has a notficiation service, fire it off | 7 | # if the app has a notficiation service, fire it off |
8 | - unless notice.app.notification_service.nil? | 8 | + if notice.app.notification_service_configured? |
9 | notice.app.notification_service.create_notification(notice.problem) | 9 | notice.app.notification_service.create_notification(notice.problem) |
10 | end | 10 | end |
11 | 11 |