mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Merge branch 'netbox-community:develop' into 8366-job-scheduling
This commit is contained in:
@@ -442,6 +442,12 @@ class ImageAttachmentEditView(generic.ObjectEditView):
|
||||
def get_return_url(self, request, obj=None):
|
||||
return obj.parent.get_absolute_url() if obj else super().get_return_url(request)
|
||||
|
||||
def get_extra_addanother_params(self, request):
|
||||
return {
|
||||
'content_type': request.GET.get('content_type'),
|
||||
'object_id': request.GET.get('object_id'),
|
||||
}
|
||||
|
||||
|
||||
class ImageAttachmentDeleteView(generic.ObjectDeleteView):
|
||||
queryset = ImageAttachment.objects.all()
|
||||
@@ -529,9 +535,10 @@ class ReportListView(ContentTypePermissionRequiredMixin, View):
|
||||
}
|
||||
|
||||
ret = []
|
||||
for module, report_list in reports:
|
||||
|
||||
for module, report_list in reports.items():
|
||||
module_reports = []
|
||||
for report in report_list:
|
||||
for report in report_list.values():
|
||||
report.result = results.get(report.full_name, None)
|
||||
module_reports.append(report)
|
||||
ret.append((module, module_reports))
|
||||
@@ -615,7 +622,7 @@ class ReportResultView(ContentTypePermissionRequiredMixin, View):
|
||||
result = get_object_or_404(JobResult.objects.all(), pk=job_result_pk, obj_type=report_content_type)
|
||||
|
||||
# Retrieve the Report and attach the JobResult to it
|
||||
module, report_name = result.name.split('.')
|
||||
module, report_name = result.name.split('.', maxsplit=1)
|
||||
report = get_report(module, report_name)
|
||||
report.result = result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user