Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-07-31 21:32:17 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2017-08-03 19:07:18 +0300
commite7d136ebdabf3f784412b859bf3ad7427c88e7f6 (patch)
treeb3bf8669f9c9e183f6a7cf66702f3641bb47105d /app/models/notification_recipient.rb
parent8386d69f8f4a75a45e0226f4ad89b7d200c6d84d (diff)
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/models/notification_recipient.rb')
-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