2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

Change foreign keys to TreeForeignKey

This commit is contained in:
Oliver Walters
2019-09-08 19:19:39 +10:00
parent 678157aac4
commit 3eb3c43e5c
7 changed files with 111 additions and 17 deletions

View File

@ -0,0 +1,20 @@
# Generated by Django 2.2.5 on 2019-09-08 09:16
from django.db import migrations
import django.db.models.deletion
import mptt.fields
class Migration(migrations.Migration):
dependencies = [
('stock', '0012_auto_20190908_0405'),
]
operations = [
migrations.AlterField(
model_name='stockitem',
name='location',
field=mptt.fields.TreeForeignKey(blank=True, help_text='Where is this stock item located?', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='stock_items', to='stock.StockLocation'),
),
]

View File

@ -0,0 +1,20 @@
# Generated by Django 2.2.5 on 2019-09-08 09:18
from django.db import migrations
import django.db.models.deletion
import mptt.fields
class Migration(migrations.Migration):
dependencies = [
('stock', '0013_auto_20190908_0916'),
]
operations = [
migrations.AlterField(
model_name='stocklocation',
name='parent',
field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='children', to='stock.StockLocation'),
),
]