diff options
author | Patrick Maia and Victor Shyba <pixelated-team+pmaia+vshyba@thoughtworks.com> | 2014-09-05 23:35:22 +0000 |
---|---|---|
committer | Patrick Maia <pmaia@thoughtworks.com> | 2014-09-05 23:35:22 +0000 |
commit | 01f4ba64576a21d68ce79acbd8cefd0f2f5dc375 (patch) | |
tree | 36a32871e2ea6d891b7354df2f042f003a854e29 /service/pixelated/adapter | |
parent | 3c79a54ab332e15f31a4a57a4a9baabf4b62e26a (diff) |
#51 - uses list every time we need to convert to json
Diffstat (limited to 'service/pixelated/adapter')
-rw-r--r-- | service/pixelated/adapter/pixelated_mail.py | 4 | ||||
-rw-r--r-- | service/pixelated/adapter/tag.py | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/service/pixelated/adapter/pixelated_mail.py b/service/pixelated/adapter/pixelated_mail.py index 31e8ccc7..2b9ccd35 100644 --- a/service/pixelated/adapter/pixelated_mail.py +++ b/service/pixelated/adapter/pixelated_mail.py @@ -82,7 +82,7 @@ class PixelatedMail: def _persist_mail_tags(self, current_tags): hdoc = self.leap_mail.hdoc - hdoc.content['headers']['X-Tags'] = current_tags + hdoc.content['headers']['X-Tags'] = list(current_tags) self.leap_mail._soledad.put_doc(hdoc) def has_tag(self, tag): @@ -95,7 +95,7 @@ class PixelatedMail: return { 'header': _headers, 'ident': self.ident, - 'tags': self.tags, + 'tags': list(self.tags), 'status': statuses, 'security_casing': self.security_casing, 'body': self.body diff --git a/service/pixelated/adapter/tag.py b/service/pixelated/adapter/tag.py index 45a972ab..ba545043 100644 --- a/service/pixelated/adapter/tag.py +++ b/service/pixelated/adapter/tag.py @@ -62,12 +62,11 @@ class Tag: 'read': 0, 'starred': 0, 'replied': 0}, - 'mails': self.mails + 'mails': list(self.mails) } def as_json_string(self): tag_dict = self.as_dict() - tag_dict['mails'] = list(self.mails) return json.dumps(tag_dict) def __repr__(self): |