Add template filters after being cached

The MemoryCache copy the stored template since 7bbbb91621ab but Genshi
Template clear the filters when copied.

Closes #12963
(grafted from 3111fe5130705da70e46b07e4b7cb47012430964)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2024-01-28 00:34:12 +01:00
parent f6adaaa16a
commit e758ce2b9b
+1 -1
View File
@@ -362,8 +362,8 @@ class Report(URLMixin, PoolBase):
loader = relatorio.reporting.MIMETemplateLoader()
klass = loader.factories[loader.get_type(mimetype)]
template = klass(BytesIO(report.report_content))
cls._callback_loader(report, template)
report.set_template_cached(template)
cls._callback_loader(report, template)
data = template.generate(**report_context).render()
if hasattr(data, 'getvalue'):
data = data.getvalue()