From e7a093f55df2a5b5d1085618f66c807bc85b7b03 Mon Sep 17 00:00:00 2001 From: Jefferson Stachelski Date: Mon, 18 Jan 2016 18:20:48 -0200 Subject: Some work around that fixed jeffhsta wazokazi account --- service/pixelated/adapter/search/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'service/pixelated/adapter/search/__init__.py') diff --git a/service/pixelated/adapter/search/__init__.py b/service/pixelated/adapter/search/__init__.py index dbd4d288..35087101 100644 --- a/service/pixelated/adapter/search/__init__.py +++ b/service/pixelated/adapter/search/__init__.py @@ -115,8 +115,9 @@ class SearchEngine(object): return FileIndex.create(storage, self._mail_schema(), indexname='mails') def index_mail(self, mail): - with AsyncWriter(self._index) as writer: - self._index_mail(writer, mail) + if mail is not None: + with AsyncWriter(self._index) as writer: + self._index_mail(writer, mail) def _index_mail(self, writer, mail): mdict = mail.as_dict() -- cgit v1.2.3