diff --git a/attachment_preview/__manifest__.py b/attachment_preview/__manifest__.py index 7020cd32..ee02c750 100644 --- a/attachment_preview/__manifest__.py +++ b/attachment_preview/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Preview attachments", - "version": "11.0.1.2.0", + "version": "11.0.1.2.1", "author": "Therp BV," "Onestein," "Odoo Community Association (OCA)", diff --git a/attachment_preview/models/ir_attachment.py b/attachment_preview/models/ir_attachment.py index e1beaf55..0b88b0e7 100644 --- a/attachment_preview/models/ir_attachment.py +++ b/attachment_preview/models/ir_attachment.py @@ -41,7 +41,7 @@ class IrAttachment(models.Model): ids_to_browse = [_id for _id in ids_to_browse if _id not in result] for this in self.env[model].with_context( bin_size=True).browse(ids_to_browse): - if this[binary_field] is None: + if not this[binary_field]: result[this.id] = False continue try: