Fixed mailer (error when no assignee)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@592 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
25f8c64f92
commit
7363428703
@ -31,8 +31,8 @@ class Mailer < ActionMailer::Base
|
|||||||
# Sends to all project members
|
# Sends to all project members
|
||||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
|
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }.compact
|
||||||
# Sends to author and assignee (even if they turned off mail notification)
|
# Sends to author and assignee (even if they turned off mail notification)
|
||||||
@recipients << issue.author.mail
|
@recipients << issue.author.mail if issue.author
|
||||||
@recipients << issue.assigned_to.mail
|
@recipients << issue.assigned_to.mail if issue.assigned_to
|
||||||
@recipients.compact!
|
@recipients.compact!
|
||||||
@recipients.uniq!
|
@recipients.uniq!
|
||||||
@from = Setting.mail_from
|
@from = Setting.mail_from
|
||||||
@ -46,8 +46,8 @@ class Mailer < ActionMailer::Base
|
|||||||
issue = journal.journalized
|
issue = journal.journalized
|
||||||
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
|
@recipients = issue.project.members.collect { |m| m.user.mail if m.user.mail_notification }
|
||||||
# Sends to author and assignee (even if they turned off mail notification)
|
# Sends to author and assignee (even if they turned off mail notification)
|
||||||
@recipients << issue.author.mail
|
@recipients << issue.author.mail if issue.author
|
||||||
@recipients << issue.assigned_to.mail
|
@recipients << issue.assigned_to.mail if issue.assigned_to
|
||||||
@recipients.compact!
|
@recipients.compact!
|
||||||
@recipients.uniq!
|
@recipients.uniq!
|
||||||
# Watchers in cc
|
# Watchers in cc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user