Cross-reference MAC address migrators

This commit is contained in:
Jeremy Stretch 2025-06-03 15:15:30 -04:00
parent 5a0d33a4a8
commit 71ee2a996e
2 changed files with 2 additions and 0 deletions

View File

@ -55,6 +55,7 @@ class Migration(migrations.Migration):
]
# See peer migrator in virtualization.0048_populate_mac_addresses before making changes
def oc_interface_primary_mac_address(objectchange, reverting):
MACAddress = apps.get_model('dcim', 'MACAddress')
interface_ct = ContentType.objects.get_by_natural_key('dcim', 'interface')

View File

@ -54,6 +54,7 @@ class Migration(migrations.Migration):
]
# See peer migrator in dcim.0200_populate_mac_addresses before making changes
def oc_vminterface_primary_mac_address(objectchange, reverting):
MACAddress = apps.get_model('dcim', 'MACAddress')
vminterface_ct = ContentType.objects.get_by_natural_key('virtualization', 'vminterface')