Do not use cached report instance
We must always use a copy of the cached report instance to allow to add directives to the template before being prepared. Closes #14460
This commit is contained in:
@@ -392,7 +392,7 @@ class Report(URLMixin, PoolBase):
|
||||
loader = relatorio.reporting.MIMETemplateLoader()
|
||||
klass = loader.factories[loader.get_type(mimetype)]
|
||||
template = klass(BytesIO(report.report_content))
|
||||
template = report.set_template_cached(template)
|
||||
report.set_template_cached(template)
|
||||
translate = cls._callback_loader(report, template)
|
||||
if translate:
|
||||
report_context = report_context.copy()
|
||||
|
||||
Reference in New Issue
Block a user