<gh_stars>10-100
# Generated by Django 3.1.4 on 2020-12-18 10:33

from django.db import migrations
from mptt import register, managers


def rebuild_site_tree(apps, schema_editor):
    manager = managers.TreeManager()
    manager.model = apps.get_model('outdoor', 'Site')
    register(manager.model)
    manager.contribute_to_class(manager.model, 'objects')
    manager.rebuild()


class Migration(migrations.Migration):

    dependencies = [
        ('outdoor', '0009_auto_20201218_1033'),
    ]

    operations = [
        migrations.RunPython(rebuild_site_tree, migrations.RunPython.noop)
    ]

# Generated by Django 3.1.4 on 2020-12-18 10:33

from django.db import migrations
from mptt import register, managers


def rebuild_site_tree(apps, schema_editor):
    manager = managers.TreeManager()
    manager.model = apps.get_model('outdoor', 'Site')
    register(manager.model)
    manager.contribute_to_class(manager.model, 'objects')
    manager.rebuild()


class Migration(migrations.Migration):

    dependencies = [
        ('outdoor', '0009_auto_20201218_1033'),
    ]

    operations = [
        migrations.RunPython(rebuild_site_tree, migrations.RunPython.noop)
    ]
# Generated by Django 3.1.4 on 2020-12-18 10:33