diff --git a/netbox/dcim/migrations/0226_modulebay_rebuild_tree.py b/netbox/dcim/migrations/0226_modulebay_rebuild_tree.py index 2d3cf5b50..1315b701b 100644 --- a/netbox/dcim/migrations/0226_modulebay_rebuild_tree.py +++ b/netbox/dcim/migrations/0226_modulebay_rebuild_tree.py @@ -13,7 +13,8 @@ def rebuild_mptt(apps, schema_editor): class MPTTMeta: order_insertion_by = ('module', 'name',) - ModuleBay._mptt_meta = mptt.models.MPTTOptions(MPTTMeta, ModuleBay) + ModuleBay.MPTTMeta = MPTTMeta + ModuleBay._mptt_meta = mptt.models.MPTTOptions(MPTTMeta) manager = mptt.managers.TreeManager() manager.model = ModuleBay