Commit ad9b5d81 authored by Elouan Martinet's avatar Elouan Martinet
Browse files

[views] Make sure result of xml_escape is converted to str

Using https://six.readthedocs.io/#six.ensure_text
parent a0f9af2b0c5a
......@@ -87,7 +87,8 @@ class CeleryTaskLogs(tabs.TabsMixin, EntityView):
def entity_call(self, entity):
logs = entity.cw_adapt_to('ICeleryTask').logs
if logs:
logs = xml_escape(logs).decode('utf-8', errors='ignore')
logs = xml_escape(logs)
logs = six.ensure_text(logs, errors='ignore')
self._cw.view('celerytask.task_logs.table',
pyvalue=log_to_table(logs), paginate=True,
default_level=self.default_level, w=self.w)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment