mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
catch case if no binary is given (#112)
This commit is contained in:
parent
f27a5befe2
commit
594f0dd265
@ -61,6 +61,9 @@ class IrAttachment(Model):
|
||||
ids_to_browse = [_id for _id in ids_to_browse if _id not in result]
|
||||
for this in self.pool[model].browse(cr, uid, ids_to_browse,
|
||||
context=context):
|
||||
if this[binary_field] is None:
|
||||
result[this.id] = False
|
||||
continue
|
||||
try:
|
||||
import magic
|
||||
ms = magic.open(
|
||||
|
Loading…
Reference in New Issue
Block a user