mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -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')
|
ScriptModule = apps.get_model('extras', 'ScriptModule')
|
||||||
script_root_path = normalize(settings.SCRIPTS_ROOT)
|
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.file_path = script.file_path[len(script_root_path):]
|
||||||
script.save()
|
script.save()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user