1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

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

@@ -876,7 +876,7 @@ class ReportView(ContentTypePermissionRequiredMixin, View):
return render(request, 'extras/report.html', {
'module': module,
'report': report,
'form': ReportForm(),
'form': ReportForm(scheduling_enabled=report.scheduling_enabled),
})
def post(self, request, module, name):
@@ -885,7 +885,7 @@ class ReportView(ContentTypePermissionRequiredMixin, View):
module = get_object_or_404(ReportModule.objects.restrict(request.user), file_path__startswith=module)
report = module.reports[name]()
form = ReportForm(request.POST)
form = ReportForm(request.POST, scheduling_enabled=report.scheduling_enabled)
if form.is_valid():