mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-23 07:56:44 -06:00
14025 match start of string with regex
This commit is contained in:
parent
de30f55134
commit
b011c2c7c6
@ -1152,7 +1152,7 @@ class ScriptListView(ContentTypePermissionRequiredMixin, View):
|
||||
|
||||
|
||||
def get_script_module(module, request):
|
||||
return get_object_or_404(ScriptModule.objects.restrict(request.user), file_path=f"{module}.py")
|
||||
return get_object_or_404(ScriptModule.objects.restrict(request.user), file_path__regex=f"^{module}\\.")
|
||||
|
||||
|
||||
class ScriptView(ContentTypePermissionRequiredMixin, View):
|
||||
|
Loading…
Reference in New Issue
Block a user