[IMP] coerce 'falsy' char sizes to None

Otherwise users using fields.char(size=False) will see their content disappear without warning, not cool

bzr revid: xmo@openerp.com-20120723140502-nrtgw0o47ewj25qa
This commit is contained in:
Xavier Morel 2012-07-23 16:05:02 +02:00
parent 8b0f8a0992
commit ce02c0887a
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ class char(_column):
_type = 'char'
def __init__(self, string="unknown", size=None, **args):
_column.__init__(self, string=string, size=size, **args)
_column.__init__(self, string=string, size=size or None, **args)
self._symbol_set = (self._symbol_c, self._symbol_set_char)
# takes a string (encoded in utf8) and returns a string (encoded in utf8)