From 399afffddfb4611708bc63ffff39a8a58459de94 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 13 May 2022 16:46:55 -0400 Subject: [PATCH] Fix CablePath migration --- netbox/dcim/migrations/0158_cablepath_populate_path.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/migrations/0158_cablepath_populate_path.py b/netbox/dcim/migrations/0158_cablepath_populate_path.py index 972c70143..47113513f 100644 --- a/netbox/dcim/migrations/0158_cablepath_populate_path.py +++ b/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):