From d279caa4e5b8a3c1e21a630e4333a666c2f335d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 19 Sep 2011 14:47:49 +0200 Subject: [PATCH] Fix migration of binary fields base64 doesn't work with buffer --- trytond/ir/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/ir/action.py b/trytond/ir/action.py index 47b217b9dc..2ad21b41fd 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -349,7 +349,7 @@ class ActionReport(ModelSQL, ModelView): 'FROM "' + self._table + '"') for report_id, content in cursor.fetchall(): if content: - content = base64.decodestring(content) + content = base64.decodestring(str(content)) cursor.execute('UPDATE "' + self._table + '" ' 'SET report_content_custom = %s ' 'WHERE id = %s', (content, report_id))