Fix migration of binary fields

base64 doesn't work with buffer
This commit is contained in:
Cédric Krier committed 2011-09-19 14:47:49 +02:00
1 parent f44bc9caea
commit d279caa4e5
1 file changed
+1 -1
+1 -1
View File
@@ -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))