mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
74704a7c1e
Ref: https://docs.djangoproject.com/en/dev/howto/writing-migrations/#non-atomic-migrations
24 lines
432 B
Python
24 lines
432 B
Python
# Generated by Django 2.2.5 on 2019-09-08 04:04
|
|
|
|
from django.db import migrations
|
|
from part import models
|
|
|
|
|
|
def update_tree(apps, schema_editor):
|
|
# Update the PartCategory MPTT model
|
|
|
|
models.PartCategory.objects.rebuild()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
atomic = False
|
|
|
|
dependencies = [
|
|
('part', '0019_auto_20190908_0404'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(update_tree)
|
|
]
|