mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-22 13:22:19 -06:00
[FIX] attachment_preview: fix get_binary_extension
This commit is contained in:
@@ -41,6 +41,8 @@ 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):
|
||||
result[this.id] = False
|
||||
if not this[binary_field]:
|
||||
continue
|
||||
try:
|
||||
import magic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user