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:
http://jneen.net/ 2017-07-31 11:32:17 -07:00
parent 8386d69f8f
commit e7d136ebda

View file

@ -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