From bf7a2eb6a19bdd54e213be03359deb0e9458c0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 16 Jul 2008 18:08:26 +0200 Subject: [PATCH] Add fix for unicode migration --- trytond/tools/convert.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trytond/tools/convert.py b/trytond/tools/convert.py index 76567d4aa7..cc5c5cb38c 100644 --- a/trytond/tools/convert.py +++ b/trytond/tools/convert.py @@ -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...