Commit af2360c6 authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_deferred_style: Fix activity dependency in reports

Base_report needs to get also the cleanup_tag
to make sure it is launched before active process is deleted
parent 25ad9ece
Pipeline #20493 failed with stage
in 0 seconds
......@@ -25,6 +25,7 @@ with portal.Localizer.translationContext(localizer_language):
report_request = portal.ERP5Site_filterRequestForDeferredStyle(request)
active_process = portal.portal_activities.newActiveProcess()
inner_tag = 'compute-report-%s' % random.randint(0, 1000)
for idx, report_section in enumerate(report_section_list):
if report_section.getPath():
......@@ -34,7 +35,7 @@ for idx, report_section in enumerate(report_section_list):
doc.activate(activity='SQLQueue',
node=portal.portal_preferences.getPreferredDeferredReportActivityFamily(),
active_process=active_process,
tag=tag,
tag=inner_tag,
priority=priority,
).Base_renderReportSection(skin_name=skin_name,
localizer_language=localizer_language,
......@@ -51,7 +52,8 @@ if activity_context == portal:
activity_context.activate(
activity='SQLQueue',
node=portal.portal_preferences.getPreferredDeferredReportActivityFamily(),
after_tag=tag,
after_tag=inner_tag,
tag=tag,
priority=priority,
).Base_report(
active_process_url=active_process.getRelativeUrl(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment