mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-18 04:56:33 -06:00
[FIX] Robustness when attachment not present
This commit is contained in:
parent
77a20f38a9
commit
22c9aa54d0
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Preview attachments",
|
"name": "Preview attachments",
|
||||||
"version": "11.0.1.2.0",
|
"version": "11.0.1.2.1",
|
||||||
"author": "Therp BV,"
|
"author": "Therp BV,"
|
||||||
"Onestein,"
|
"Onestein,"
|
||||||
"Odoo Community Association (OCA)",
|
"Odoo Community Association (OCA)",
|
||||||
|
@ -41,7 +41,7 @@ class IrAttachment(models.Model):
|
|||||||
ids_to_browse = [_id for _id in ids_to_browse if _id not in result]
|
ids_to_browse = [_id for _id in ids_to_browse if _id not in result]
|
||||||
for this in self.env[model].with_context(
|
for this in self.env[model].with_context(
|
||||||
bin_size=True).browse(ids_to_browse):
|
bin_size=True).browse(ids_to_browse):
|
||||||
if this[binary_field] is None:
|
if not this[binary_field]:
|
||||||
result[this.id] = False
|
result[this.id] = False
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user