Merge branch 'develop' into feature

This commit is contained in:
Jeremy Stretch
2024-10-11 11:29:36 -04:00
232 changed files with 3956 additions and 3334 deletions

View File

@@ -0,0 +1,26 @@
from django.db import migrations
import mptt
import mptt.managers
def rebuild_mptt(apps, schema_editor):
manager = mptt.managers.TreeManager()
ModuleBay = apps.get_model('dcim', 'ModuleBay')
manager.model = ModuleBay
mptt.register(ModuleBay)
manager.contribute_to_class(ModuleBay, 'objects')
manager.rebuild()
class Migration(migrations.Migration):
dependencies = [
('dcim', '0190_nested_modules'),
]
operations = [
migrations.RunPython(
code=rebuild_mptt,
reverse_code=migrations.RunPython.noop
),
]