Enable scheduling_enabled parameter for reports

This commit is contained in:
jeremystretch
2023-04-17 13:12:14 -04:00
committed by Jeremy Stretch
parent 197c6a1cbf
commit b167153186
8 changed files with 43 additions and 18 deletions

View File

@@ -244,8 +244,12 @@ class ReportViewSet(ViewSet):
raise RQWorkerNotRunningException()
# Retrieve and run the Report. This will create a new Job.
module, report = self._get_report(pk)
input_serializer = serializers.ReportInputSerializer(data=request.data)
module, report_cls = self._get_report(pk)
report = report_cls()
input_serializer = serializers.ReportInputSerializer(
data=request.data,
context={'report': report}
)
if input_serializer.is_valid():
report.result = Job.enqueue(