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 : 6.0
This commit is contained in:
1 parent
951618e3d6
commit
57b96bc3df
1 file changed
+1
-1
@@ -324,8 +324,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