mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
FIX sql_request_abstract: b64encode use a Bytes like object
This commit is contained in:
committed by
mariadforgeflow
parent
48c49e2ad6
commit
a46e6d2e0e
@@ -5,7 +5,7 @@
|
||||
|
||||
import re
|
||||
import uuid
|
||||
from io import StringIO
|
||||
from io import BytesIO
|
||||
import base64
|
||||
from psycopg2 import ProgrammingError
|
||||
|
||||
@@ -167,9 +167,8 @@ class SQLRequestMixin(models.AbstractModel):
|
||||
rollback_name = self._create_savepoint()
|
||||
try:
|
||||
if mode == 'stdout':
|
||||
output = StringIO.StringIO()
|
||||
output = BytesIO()
|
||||
self.env.cr.copy_expert(query, output)
|
||||
output.getvalue()
|
||||
res = base64.b64encode(output.getvalue())
|
||||
output.close()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user