mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
Add missing migrator
This commit is contained in:
parent
d223c01dcd
commit
b51a3a1710
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user