diff --git a/netbox/extras/views.py b/netbox/extras/views.py index cc53c465d..ae43ac489 100644 --- a/netbox/extras/views.py +++ b/netbox/extras/views.py @@ -753,6 +753,8 @@ class ScriptListView(ContentTypePermissionRequiredMixin, View): for _scripts in scripts.values(): for script in _scripts.values(): + # Prevent django from instantiating the class on all accesses + script.do_not_call_in_templates = True script.result = results.get(script.full_name) return render(request, 'extras/script_list.html', { diff --git a/netbox/templates/extras/script_list.html b/netbox/templates/extras/script_list.html index ccbdca705..a6f6833c9 100644 --- a/netbox/templates/extras/script_list.html +++ b/netbox/templates/extras/script_list.html @@ -34,7 +34,7 @@ {% for class_name, script in module_scripts.items %}