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

12416 warning for missing script file (#12456)

* 12416 warning for missing script file

* 12416 widen exception catching for internal script error

* Update netbox/extras/models/scripts.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>

* 12416 update from review feedback

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Arthur Hanson
2023-05-05 06:37:38 -07:00
committed by GitHub
parent 7a38f601de
commit 9909213c0d
3 changed files with 52 additions and 39 deletions

View File

@@ -1033,7 +1033,6 @@ class ScriptView(ContentTypePermissionRequiredMixin, View):
return 'extras.view_script'
def get(self, request, module, name):
print(module)
module = get_object_or_404(ScriptModule.objects.restrict(request.user), file_path__startswith=module)
script = module.scripts[name]()
form = script.as_form(initial=normalize_querydict(request.GET))