summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2015-01-05 14:42:34 -0200
committerDuda Dornelles <ddornell@thoughtworks.com>2015-01-05 14:42:34 -0200
commite36e4e95b80b8ac2265136f12d16510877db4282 (patch)
tree1f841983c7549ec07796392abcf9e40bfaed5f05 /service/pixelated
parent8eec49f1551a84f98df1d11a837cfbfb2f6b1ac1 (diff)
#193 get next uid from the mailbox we are trying to add the email instead of getting it always from the index
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/soledad/soledad_writer_mixin.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/pixelated/adapter/soledad/soledad_writer_mixin.py b/service/pixelated/adapter/soledad/soledad_writer_mixin.py
index 4b06df0b..30ca57bd 100644
--- a/service/pixelated/adapter/soledad/soledad_writer_mixin.py
+++ b/service/pixelated/adapter/soledad/soledad_writer_mixin.py
@@ -33,7 +33,7 @@ class SoledadWriterMixin(SoledadDbFacadeMixin, object):
self._update_index([mail.fdoc])
def create_mail(self, mail, mailbox_name):
- mbox = [m for m in self.get_all_mbox() if m.content['mbox'] == 'INBOX'][0]
+ mbox = self.get_mbox(mailbox_name)[0]
uid = mbox.content['lastuid'] + 1
new_docs = [self.create_doc(doc) for doc in mail.get_for_save(next_uid=uid, mailbox=mailbox_name)]