Add missing migrator

This commit is contained in:
Jeremy Stretch 2025-06-03 15:43:50 -04:00
parent d223c01dcd
commit b51a3a1710

View File

@ -100,3 +100,16 @@ class Migration(migrations.Migration):
), ),
), ),
] ]
def oc_rename_type(objectchange, reverting):
for data in (objectchange.prechange_data, objectchange.postchange_data):
if data is None:
continue
if 'type' in data:
data['form_factor'] = data.pop('type')
objectchange_migrators = {
'dcim.rack': oc_rename_type,
}