提交 583bfac5 编写于 作者: D Dmitriy Zaporozhets

Fix Note notification for entities without assignee

上级 5ad4be29
......@@ -109,7 +109,10 @@ class NotificationService
recipients = [note.commit_author]
else
opts.merge!(noteable_id: note.noteable_id)
recipients = [note.noteable.try(:author), note.noteable.try(:assignee)]
target = note.noteable
recipients = []
recipients << target.assignee if target.respond_to?(:assignee)
recipients << target.author if target.respond_to?(:author)
end
# Get users who left comment in thread
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册