[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.
This commit is contained in:
parent
1c0bc7cc16
commit
45faa3a941
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue