diff --git a/attachment_preview/__openerp__.py b/attachment_preview/__openerp__.py index b733a689..34f2c590 100644 --- a/attachment_preview/__openerp__.py +++ b/attachment_preview/__openerp__.py @@ -21,7 +21,7 @@ { "name": "Preview attachments", "version": "1.1", - "author": "Therp BV", + "author": "Therp BV,Odoo Community Association (OCA)", "license": "AGPL-3", "complexity": "normal", 'summary': 'Preview attachments supported by Viewer.js', diff --git a/attachment_preview/model/ir_attachment.py b/attachment_preview/model/ir_attachment.py index 908247ff..b00d3474 100644 --- a/attachment_preview/model/ir_attachment.py +++ b/attachment_preview/model/ir_attachment.py @@ -49,8 +49,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]))