Fixes mail handler for when there's no attachments (#8651).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6325 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4f4b3594db
commit
1317b99c3d
|
@ -198,7 +198,7 @@ class MailHandler < ActionMailer::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_attachments(obj)
|
def add_attachments(obj)
|
||||||
if email.attachments.any?
|
if email.attachments && email.attachments.any?
|
||||||
email.attachments.each do |attachment|
|
email.attachments.each do |attachment|
|
||||||
obj.attachments << Attachment.create(:container => obj,
|
obj.attachments << Attachment.create(:container => obj,
|
||||||
:file => attachment,
|
:file => attachment,
|
||||||
|
|
Loading…
Reference in New Issue