[FIX] Take empty attachments into account

This commit is contained in:
Stefan Rijnhart 2015-02-18 19:18:37 +01:00
parent eb46f3a2a7
commit 3901852379

View File

@ -58,6 +58,8 @@ class Attachment(orm.Model):
ms.load()
for attachment_id in ids:
attachment = self.browse(cr, uid, attachment_id, context=context)
if not attachment.datas:
continue
file_type = ms.buffer(
b64decode(attachment.datas)).split(';')[0]
logger.debug(