diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-07-15 12:01:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-07-15 12:01:53 +0000 |
commit | 7363428703e4a86c3c7b20e5adc00e9ae9428b2e (patch) | |
tree | 9ac138d10299e980a3c9ba2c4db92d16709ff6b3 /app | |
parent | 25f8c64f925d63639bc1878989786a8edb3b4ce2 (diff) | |
download | redmine-7363428703e4a86c3c7b20e5adc00e9ae9428b2e.tar.gz redmine-7363428703e4a86c3c7b20e5adc00e9ae9428b2e.zip |
Fixed mailer (error when no assignee)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@592 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/mailer.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index bd4b6b7ea..cd5925da2 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -31,8 +31,8 @@ class Mailer < ActionMailer::Base # Sends to all project members @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) - @recipients << issue.author.mail - @recipients << issue.assigned_to.mail + @recipients << issue.author.mail if issue.author + @recipients << issue.assigned_to.mail if issue.assigned_to @recipients.compact! @recipients.uniq! @from = Setting.mail_from @@ -46,8 +46,8 @@ class Mailer < ActionMailer::Base issue = journal.journalized @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) - @recipients << issue.author.mail - @recipients << issue.assigned_to.mail + @recipients << issue.author.mail if issue.author + @recipients << issue.assigned_to.mail if issue.assigned_to @recipients.compact! @recipients.uniq! # Watchers in cc |