diff options
author | Tiago Ferraz <tiago.ferraz@gmail.com> | 2015-03-30 19:12:39 -0300 |
---|---|---|
committer | Tiago Ferraz <tiago.ferraz@gmail.com> | 2015-03-30 19:12:39 -0300 |
commit | 793474766430a514851c57b6398cf61e58d5d352 (patch) | |
tree | 4a46958c142940a33ecb7b9b9aa1ee49c0982159 /service/pixelated/adapter | |
parent | 0fa197a139b9a9e3a543afdd013be1a04a2c7c47 (diff) |
Fixing if logic on _extract_alternative
Diffstat (limited to 'service/pixelated/adapter')
-rw-r--r-- | service/pixelated/adapter/soledad/soledad_reader_mixin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/service/pixelated/adapter/soledad/soledad_reader_mixin.py b/service/pixelated/adapter/soledad/soledad_reader_mixin.py index bbcc0828..347938ed 100644 --- a/service/pixelated/adapter/soledad/soledad_reader_mixin.py +++ b/service/pixelated/adapter/soledad/soledad_reader_mixin.py @@ -104,11 +104,11 @@ class SoledadReaderMixin(SoledadDbFacadeMixin, object): def _extract_alternative(self, hdoc, headers_dict): bdoc = self.get_content_by_phash(hdoc['phash']) - if bdoc is not None: + if bdoc is None: logger.warning("No BDOC content found for message!!!") - raw_content = bdoc.content['raw'] - else: raw_content = "" + else: + raw_content = bdoc.content['raw'] return {'headers': headers_dict, 'content': raw_content} |