diff options
author | Kali Kaneko <kali@leap.se> | 2015-07-10 12:01:40 -0400 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2015-07-13 11:55:30 -0400 |
commit | 6b2a3b5943e29cab4cc8d0bd6d8ff6c74ad3c077 (patch) | |
tree | f4203f05fda26a50002c6779f77bf329bbe1fbc4 /mail/src | |
parent | 48d0039284a7780fcac7c0b3bc995dbd4694791f (diff) |
[bug] Return the first cdoc if no body found
In the case of a message with just one non-text attachment, something
has to be returned for the body payload. (For instance, a message with
only one image).
Diffstat (limited to 'mail/src')
-rw-r--r-- | mail/src/leap/mail/adaptors/soledad.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mail/src/leap/mail/adaptors/soledad.py b/mail/src/leap/mail/adaptors/soledad.py index 2b1d2ff2..d114707e 100644 --- a/mail/src/leap/mail/adaptors/soledad.py +++ b/mail/src/leap/mail/adaptors/soledad.py @@ -688,7 +688,8 @@ class MessageWrapper(object): """ body_phash = self.hdoc.body if not body_phash: - return None + if self.cdocs: + return self.cdocs[1] d = store.get_doc('C-' + body_phash) d.addCallback(lambda doc: ContentDocWrapper(**doc.content)) return d |