diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2015-07-01 10:04:47 +0200 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2015-07-01 10:12:24 +0200 |
| commit | 45faa3a9414631f73764a2e6fbf3b7ecb93c8a7e (patch) | |
| tree | 6c6a4192dbbc2868a19c060f7e544715d0523090 | |
| parent | 1c0bc7cc1619ffde52e5bc92afb954052883d4a5 (diff) | |
[FIX] base: fixing fix, attachment file size and None
In commit 44f2c8d54 we unified the return value of the function to int,
but it seems the returned size could be None which is not a valid input
of the int() built-in function.
| -rw-r--r-- | openerp/addons/base/ir/ir_attachment.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openerp/addons/base/ir/ir_attachment.py b/openerp/addons/base/ir/ir_attachment.py index 97edffd6ada..ad257b418c3 100644 --- a/openerp/addons/base/ir/ir_attachment.py +++ b/openerp/addons/base/ir/ir_attachment.py @@ -133,7 +133,7 @@ class ir_attachment(osv.osv): else: result[attach.id] = attach.db_datas if bin_size: - result[attach.id] = int(result[attach.id]) + result[attach.id] = int(result[attach.id] or 0) return result |
