From 711aa6272c940d814c0b7f7ef22ab898304d0a35 Mon Sep 17 00:00:00 2001 From: vancouver29 Date: Thu, 13 Apr 2023 12:34:08 +0200 Subject: [PATCH] [IMP] attachment_preview: uncomment _logger in ir_attachment.py --- attachment_preview/models/ir_attachment.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/attachment_preview/models/ir_attachment.py b/attachment_preview/models/ir_attachment.py index f109d881..ca294690 100644 --- a/attachment_preview/models/ir_attachment.py +++ b/attachment_preview/models/ir_attachment.py @@ -48,14 +48,14 @@ class IrAttachment(models.Model): mimetype = magic.from_file( this._full_path(this.store_fname), mime=True ) - # _logger.debug( - # "Magic determined mimetype %s from file %s", - # mimetype, - # this.store_fname, - # ) + _logger.debug( + "Magic determined mimetype %s from file %s", + mimetype, + this.store_fname, + ) else: mimetype = magic.from_buffer(this[binary_field], mime=True) - # _logger.debug("Magic determined mimetype %s from buffer", mimetype) + _logger.debug("Magic determined mimetype %s from buffer", mimetype) except ImportError: (mimetype, encoding) = mimetypes.guess_type( "data:;base64," + this[binary_field].decode("utf-8"), strict=False