From 4bbeff828237822abacdcac891d0cb7be3fa2b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 21 Nov 2011 22:12:28 +0100 Subject: [PATCH] base64.decodestring doesn't support buffer issue2295 review181002 (transplanted from d1efc72e22f98ad9dd5779dcba19c9303be79c2d) --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 6bf9b96ff6..b2ca76c78b 100644 --- a/invoice.py +++ b/invoice.py @@ -194,7 +194,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): 'FROM "' + self._table + '"') for invoice_id, report in cursor.fetchall(): if report: - report = base64.decodestring(report) + report = base64.decodestring(str(report)) cursor.execute('UPDATE "' + self._table + '" ' 'SET invoice_report_cache = %s ' 'WHERE id = %s', (report, invoice_id))