Add fix for unicode migration

This commit is contained in:
Cédric Krier committed 2008-07-16 18:08:26 +02:00
1 parent 7f66544954
commit bf7a2eb6a1
1 file changed
+5 -1
+5 -1
View File
@@ -555,7 +555,11 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
continue
# if the fs value is the same has in the db, whe ignore it
if db_field == values[key]:
val = values[key]
if isinstance(values[key], str):
# Fix for migration to unicode
val = values[key].decode('utf-8')
if db_field == val:
continue
# we cannot update a field if it was changed by a user...