From 444c8584491ce0efe2314747326da6ab7d17490c Mon Sep 17 00:00:00 2001
From: "http://jneen.net/" <jneen@jneen.net>
Date: Tue, 1 Aug 2017 11:42:24 -0700
Subject: [PATCH] use safe navigation on notification_setting

---
 app/models/notification_recipient.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/models/notification_recipient.rb b/app/models/notification_recipient.rb
index 837b62ec0cb..a14254178e1 100644
--- a/app/models/notification_recipient.rb
+++ b/app/models/notification_recipient.rb
@@ -31,7 +31,7 @@ class NotificationRecipient
     @notification_level ||=
       case raw_notification_level
       when :custom
-        if @custom_action && notification_setting.event_enabled?(@custom_action)
+        if @custom_action && notification_setting&.event_enabled?(@custom_action)
           :watch
         else
           :custom
-- 
GitLab