Просмотр исходного кода

Fixes #16025: Fix execution of scripts via the runscript management command

Jeremy Stretch 1 год назад
Родитель
Сommit
ff8dabe8d9
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      netbox/extras/management/commands/runscript.py

+ 1 - 0
netbox/extras/management/commands/runscript.py

@@ -85,6 +85,7 @@ class Command(BaseCommand):
 
 
         module_name, script_name = script.split('.', 1)
         module_name, script_name = script.split('.', 1)
         module, script = get_module_and_script(module_name, script_name)
         module, script = get_module_and_script(module_name, script_name)
+        script = script.python_class
 
 
         # Take user from command line if provided and exists, other
         # Take user from command line if provided and exists, other
         if options['user']:
         if options['user']: