Ian Bicking wrote:
> I was going to add a FAQ entry about unicode, but then it had a bunch of
> code, and I figured I should just include the code. Now there is a
> UnicodeCol, mostly the same as what Oleg described before.
The implementation contains a bug: it doesn't handle None property, when
you try to read or set a NULL value:
File "D:\Python23\Lib\site-packages\sqlobject\main.py", line 890, in
__init__
self._create(id, **kw)
File "D:\Python23\Lib\site-packages\sqlobject\main.py", line 920, in
_create
self.set(**kw)
File "D:\Python23\Lib\site-packages\sqlobject\main.py", line 774, in set
kw[name] = dbValue = fromPython(value, self._SO_validatorState)
File "D:\Python23\Lib\site-packages\sqlobject\col.py", line 347, in
fromPython
return value.encode(self.db_encoding)
AttributeError: 'NoneType' object has no attribute 'encode'
|