diff options
author | Francis Irving <francis@mysociety.org> | 2009-12-22 14:59:05 +0000 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2009-12-22 14:59:05 +0000 |
commit | 13a07144187b30a96e2a2fd1264f010cd1d2fd2a (patch) | |
tree | 01faeb76010bf40d74468f9e9e4598ff2192d2a8 | |
parent | b0de7bfd5388a552ef58235f8cb590ff2696f10c (diff) |
Sometimes you find you have done awfullness, and should at least
document it.
-rw-r--r-- | app/models/incoming_message.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 42c80cef0..11d57d322 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -724,6 +724,11 @@ class IncomingMessage < ActiveRecord::Base end end else + # XXX Yuck. this section alters various content_type's. That puts + # it into conflict with ensure_parts_counted which it has to be + # called both before and after. It will fail with cases of + # attachments of attachments etc. + # Don't allow nil content_types if curr_mail.content_type.nil? curr_mail.content_type = 'application/octet-stream' @@ -938,6 +943,9 @@ class IncomingMessage < ActiveRecord::Base def get_attachments_for_display main_part = get_main_body_text_part leaves = get_attachment_leaves + + # XXX we have to call ensure_parts_counted after get_attachment_leaves + # which is really messy. ensure_parts_counted attachments = [] |