[FIX] avoid a crash when a binary field is False/NULL

bzr revid: christophe@tinyerp.com-20090305155657-gwb22dvyr5icwvn7
This commit is contained in:
Christophe Simonis
2009-03-05 16:56:57 +01:00
parent 8e7b6c87d6
commit 74a9a44a76
+1 -1
View File
@@ -624,7 +624,7 @@ class function(_column):
if self._type == 'binary' and context.get('bin_size', False):
# convert the data returned by the function with the size of that data...
res = dict(map(lambda (x, y): (x, tools.human_size(len(y))), res.items()))
res = dict(map(lambda (x, y): (x, tools.human_size(len(y or ''))), res.items()))
return res
def set(self, cr, obj, id, name, value, user=None, context=None):