Fix migration of binary fields
base64 doesn't work with buffer
This commit is contained in:
1 parent
f44bc9caea
commit
d279caa4e5
1 file changed
+1
-1
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user