summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorPixelated <pixelated@pix-poa-1>2015-10-16 16:54:01 -0300
committerPixelated <pixelated@pix-poa-1>2015-10-16 16:54:01 -0300
commitfa8c1da3a1106631aeaccfebe2f3a76d7a6d488a (patch)
treee016440eb101592ef7ec579876ffae5e6d40f42c /service
parentd3f9a60c2572e2abe739f94cd802555c59cd5955 (diff)
Fixed the problem Need delete doc before delete
Removed this error from the logs, the logic already works
Diffstat (limited to 'service')
-rw-r--r--service/pixelated/adapter/services/mail_service.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/service/pixelated/adapter/services/mail_service.py b/service/pixelated/adapter/services/mail_service.py
index e2614d4e..44c4c145 100644
--- a/service/pixelated/adapter/services/mail_service.py
+++ b/service/pixelated/adapter/services/mail_service.py
@@ -96,7 +96,11 @@ class MailService(object):
@defer.inlineCallbacks
def move_to_sent(self, last_draft_ident, mail):
if last_draft_ident:
- yield self.mail_store.delete_mail(last_draft_ident)
+ try:
+ yield self.mail_store.delete_mail(last_draft_ident)
+ except Exception as error:
+ pass
+
sent_mail = yield self.mail_store.add_mail('SENT', mail.raw)
sent_mail.flags.add(Status.SEEN)
yield self.mail_store.update_mail(sent_mail)