Update netbox/extras/views.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Daniel Sheppard 2024-01-20 11:29:08 -06:00 committed by GitHub
parent 8918b111d3
commit 33075a09a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1231,7 +1231,7 @@ class ScriptView(ContentTypePermissionRequiredMixin, View):
def get(self, request, module, name):
module = get_script_module(module, request)
script = module.scripts[name]()
jobs = module.get_jobs(name)
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)