mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
[FIX] Take empty attachments into account
This commit is contained in:
parent
eb46f3a2a7
commit
3901852379
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user