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

Allow running scripts nested in modules/packages

This commit is contained in:
kkthxbye-code
2022-09-07 22:33:24 +02:00
parent b702822857
commit f489ffa043
4 changed files with 11 additions and 5 deletions

View File

@@ -257,7 +257,7 @@ class ScriptViewSet(ViewSet):
lookup_value_regex = '[^/]+' # Allow dots
def _get_script(self, pk):
module_name, script_name = pk.split('.')
module_name, script_name = pk.split('.', maxsplit=1)
script = get_script(module_name, script_name)
if script is None:
raise Http404