2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Update to report plugin API (#4649)

explicitly add the model instance when allowing plugins to add context data
This commit is contained in:
Oliver
2023-04-21 15:28:31 +10:00
committed by GitHub
parent 9198b52398
commit ad545bad24
3 changed files with 7 additions and 5 deletions

View File

@ -217,7 +217,8 @@ class ReportTemplateBase(MetadataMixin, ReportBase):
plugins = registry.with_mixin('report')
for plugin in plugins:
plugin.add_report_context(self, request, context)
# Let each plugin add its own context data
plugin.add_report_context(self, self.object_to_print, request, context)
return context