diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 2531622a5..c53062bd6 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -198,7 +198,7 @@ class MailHandler < ActionMailer::Base end def add_attachments(obj) - if email.attachments.any? + if email.attachments && email.attachments.any? email.attachments.each do |attachment| obj.attachments << Attachment.create(:container => obj, :file => attachment,