mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Fix migration bug
This commit is contained in:
parent
1a5cb5a9f9
commit
ef0a686417
@ -15,7 +15,7 @@ def populate_mac_addresses(apps, schema_editor):
|
||||
assigned_object_type=interface_ct,
|
||||
assigned_object_id=interface.pk
|
||||
)
|
||||
for interface in Interface.objects.filter(mac_address__isnull=False)
|
||||
for interface in Interface.objects.using(db_alias).filter(mac_address__isnull=False)
|
||||
]
|
||||
MACAddress.objects.using(db_alias).bulk_create(mac_addresses, batch_size=100)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user