aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2009-12-22 14:57:01 +0000
committerFrancis Irving <francis@mysociety.org>2009-12-22 14:57:01 +0000
commitb0de7bfd5388a552ef58235f8cb590ff2696f10c (patch)
treed454ed558185cb5c021b718e651bee82e084468f /app/models
parent69e8341c6f607838238e257c00fc916a09a6e5ee (diff)
Test for attaching attachments case, where the email attached is off
type octet-stream, so we don't know it is an email until later.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index d0428fc81..42c80cef0 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -936,10 +936,10 @@ class IncomingMessage < ActiveRecord::Base
# Returns all attachments for use in display code
# XXX is this called multiple times and should be cached?
def get_attachments_for_display
- ensure_parts_counted
-
main_part = get_main_body_text_part
leaves = get_attachment_leaves
+ ensure_parts_counted
+
attachments = []
for leaf in leaves
if leaf != main_part