summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-07-31 11:32:17 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2017-08-03 09:07:18 -0700
commite7d136ebdabf3f784412b859bf3ad7427c88e7f6 (patch)
treeb3bf8669f9c9e183f6a7cf66702f3641bb47105d /app
parent8386d69f8f4a75a45e0226f4ad89b7d200c6d84d (diff)
downloadgitlab-ce-e7d136ebdabf3f784412b859bf3ad7427c88e7f6.tar.gz
don't require project
it's not there in the case of personal snippets, f. ex., and we've already guarded against its being missing in #find_notification_setting
Diffstat (limited to 'app')
-rw-r--r--app/models/notification_recipient.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/notification_recipient.rb b/app/models/notification_recipient.rb
index 96e8e32c644..1856dfe5734 100644
--- a/app/models/notification_recipient.rb
+++ b/app/models/notification_recipient.rb
@@ -1,5 +1,5 @@
class NotificationRecipient
- attr_reader :user, :project, :type
+ attr_reader :user, :type
def initialize(user, type,
custom_action: nil,
target: nil,
@@ -13,8 +13,6 @@ class NotificationRecipient
@project = project || @target&.project
@user = user
@type = type
-
- raise ArgumentError, "Project is missing" if @project.nil?
end
def notification_setting