From 6244ef377aace0659c088f6c95878ec8aeb0cd02 Mon Sep 17 00:00:00 2001 From: Patrick Maia Date: Wed, 1 Oct 2014 11:59:29 -0300 Subject: #53 - does not allow reserved names in tags --- service/pixelated/adapter/pixelated_mail.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'service/pixelated/adapter/pixelated_mail.py') diff --git a/service/pixelated/adapter/pixelated_mail.py b/service/pixelated/adapter/pixelated_mail.py index 3e0f1ee0..2f13cb01 100644 --- a/service/pixelated/adapter/pixelated_mail.py +++ b/service/pixelated/adapter/pixelated_mail.py @@ -24,7 +24,6 @@ import pixelated.support.date from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from pycryptopp.hash import sha256 -from pixelated.support.functional import flatten class InputMail: @@ -250,8 +249,9 @@ class PixelatedMail: return self def mark_as_not_recent(self): - self.fdoc.content['flags'].remove(Status.PixelatedStatus.RECENT) - self.save() + if Status.PixelatedStatus.RECENT in self.fdoc.content['flags']: + self.fdoc.content['flags'].remove(Status.PixelatedStatus.RECENT) + self.save() return self def _persist_mail_tags(self, current_tags): -- cgit v1.2.3