mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-15 11:42:52 -06:00
* Closes: #14570 - Remove extra query for job under scripts and reports detailed view * Add report.result back as it is used by report.html
This commit is contained in:
parent
32083e58c0
commit
0eba3acdb8
@ -1233,11 +1233,6 @@ class ScriptView(ContentTypePermissionRequiredMixin, View):
|
||||
jobs = module.get_jobs(script.class_name)
|
||||
form = script.as_form(initial=normalize_querydict(request.GET))
|
||||
|
||||
# Look for a pending Job (use the latest one by creation timestamp)
|
||||
script.result = module.get_jobs(script.class_name).exclude(
|
||||
status__in=JobStatusChoices.TERMINAL_STATE_CHOICES
|
||||
).first()
|
||||
|
||||
return render(request, 'extras/script.html', {
|
||||
'job_count': jobs.count(),
|
||||
'module': module,
|
||||
|
Loading…
Reference in New Issue
Block a user