[IMP] attachment_preview: uncomment _logger in ir_attachment.py

This commit is contained in:
vancouver29 2023-04-13 12:34:08 +02:00
parent 687e23cd82
commit 711aa6272c

View File

@ -48,14 +48,14 @@ class IrAttachment(models.Model):
mimetype = magic.from_file( mimetype = magic.from_file(
this._full_path(this.store_fname), mime=True this._full_path(this.store_fname), mime=True
) )
# _logger.debug( _logger.debug(
# "Magic determined mimetype %s from file %s", "Magic determined mimetype %s from file %s",
# mimetype, mimetype,
# this.store_fname, this.store_fname,
# ) )
else: else:
mimetype = magic.from_buffer(this[binary_field], mime=True) 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: except ImportError:
(mimetype, encoding) = mimetypes.guess_type( (mimetype, encoding) = mimetypes.guess_type(
"data:;base64," + this[binary_field].decode("utf-8"), strict=False "data:;base64," + this[binary_field].decode("utf-8"), strict=False