summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei-Meng Lee <wlee@gitlab.com>2019-04-03 17:15:52 +0800
committerWei-Meng Lee <wlee@gitlab.com>2019-05-31 20:49:27 +0800
commit31775ad83aa35fa29e66d3322e6bdf921f4e1792 (patch)
tree6e0a1fb4405ab11bb4ff3c548fd2ff8f70c6509e
parent11fb4d4209cdb31cbcd64a9ec057a90cd2e63618 (diff)
downloadgitlab-ce-31775ad83aa35fa29e66d3322e6bdf921f4e1792.tar.gz
Move group_notification_email outside conditional
-rw-r--r--app/mailers/notify.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 4854ae5f0a7..11738afecb9 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -79,10 +79,9 @@ class Notify < BaseMailer
# Returns a String containing the User's email address.
def recipient(recipient_id, notification_group = nil)
@current_user = User.find(recipient_id)
+ group_notification_email = nil
if notification_group
- group_notification_email = nil
-
# Get notification group's and ancestors' notification settings
group_ids = notification_group.self_and_ancestors_ids
notification_settings = notification_group.notification_settings.where(user: @current_user) # rubocop: disable CodeReuse/ActiveRecord