[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:
parent
8b0f8a0992
commit
ce02c0887a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue