diff --git a/attachment_preview/model/ir_attachment.py b/attachment_preview/model/ir_attachment.py index b0f7cf49..c82dd6f6 100644 --- a/attachment_preview/model/ir_attachment.py +++ b/attachment_preview/model/ir_attachment.py @@ -46,8 +46,8 @@ class IrAttachment(Model): try: import magic ms = magic.open( - hasattr(magic, 'MAGIC_MIME_TYPE') - and magic.MAGIC_MIME_TYPE or magic.MAGIC_MIME) + hasattr(magic, 'MAGIC_MIME_TYPE') and + magic.MAGIC_MIME_TYPE or magic.MAGIC_MIME) ms.load() mimetype = ms.buffer( base64.b64decode(this[binary_field]))