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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user