Browse Source

Fix CablePath migration

jeremystretch 3 years ago
parent
commit
399afffddf
1 changed files with 2 additions and 2 deletions
  1. 2 2
      netbox/dcim/migrations/0158_cablepath_populate_path.py

+ 2 - 2
netbox/dcim/migrations/0158_cablepath_populate_path.py

@@ -32,8 +32,8 @@ def populate_cable_paths(apps, schema_editor):
 
         cable_paths.append(cablepath)
 
-    # Bulk create the termination objects
-    CablePath.objects.bulk_update(cable_paths, fields=('path', 'is_complete'), batch_size=100)
+    # Bulk update all CableTerminations
+    CablePath.objects.bulk_update(cable_paths, fields=('path', '_nodes', 'is_complete'), batch_size=100)
 
 
 class Migration(migrations.Migration):