mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
19680 optimize migration
This commit is contained in:
parent
ee873d922b
commit
a6bbc0b5cf
@ -23,7 +23,7 @@ def fix_script_paths(apps, schema_editor):
|
||||
|
||||
ScriptModule = apps.get_model('extras', 'ScriptModule')
|
||||
script_root_path = normalize(settings.SCRIPTS_ROOT)
|
||||
for script in ScriptModule.object.filter(file_path__startswith=script_root_path):
|
||||
for script in ScriptModule.objects.filter(file_path__startswith=script_root_path):
|
||||
script.file_path = script.file_path[len(script_root_path):]
|
||||
script.save()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user