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
This commit is contained in:
parent
8386d69f8f
commit
e7d136ebda
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue