diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2009-03-05 16:56:57 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2009-03-05 16:56:57 +0100 |
| commit | 74a9a44a76d4e97c213228cb1f08c4528ffcf73d (patch) | |
| tree | 72edb2cb304d36901bb2cd0993c3bebd36c2d437 /bin | |
| parent | 8e7b6c87d6f5371564286e73f3e3459e590f066a (diff) | |
[FIX] avoid a crash when a binary field is False/NULL
bzr revid: christophe@tinyerp.com-20090305155657-gwb22dvyr5icwvn7
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/osv/fields.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/osv/fields.py b/bin/osv/fields.py index 80229a115f7..bfd1adeef9e 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -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): |
