[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:
Nicolas Lempereur 2015-07-01 10:04:47 +02:00
parent 1c0bc7cc16
commit 45faa3a941
1 changed files with 1 additions and 1 deletions

View File

@ -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