Format report field to buffer type for migration

issue2354
review213002
This commit is contained in:
Udo Spallek
2011-12-22 12:15:03 +01:00
parent cfdbfcbf48
commit 2ca20a96c9
+1 -1
View File
@@ -194,7 +194,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
'FROM "' + self._table + '"')
for invoice_id, report in cursor.fetchall():
if report:
report = base64.decodestring(str(report))
report = buffer(base64.decodestring(str(report)))
cursor.execute('UPDATE "' + self._table + '" '
'SET invoice_report_cache = %s '
'WHERE id = %s', (report, invoice_id))