mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
Part: Alter model fields to fix data import issues
Without setting 'null=True' on fields which may be empty, the import subsequently fails if these fields are indeed empty
This commit is contained in:
48
InvenTree/part/migrations/0048_auto_20200902_1404.py
Normal file
48
InvenTree/part/migrations/0048_auto_20200902_1404.py
Normal file
@ -0,0 +1,48 @@
|
||||
# Generated by Django 3.0.7 on 2020-09-02 14:04
|
||||
|
||||
import InvenTree.fields
|
||||
import InvenTree.validators
|
||||
|
||||
import markdownx
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('part', '0047_auto_20200808_0715'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='IPN',
|
||||
field=models.CharField(blank=True, help_text='Internal Part Number', max_length=100, null=True, validators=[InvenTree.validators.validate_part_ipn]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='keywords',
|
||||
field=models.CharField(blank=True, help_text='Part keywords to improve visibility in search results', max_length=250, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='link',
|
||||
field=InvenTree.fields.InvenTreeURLField(blank=True, help_text='Link to extenal URL', null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='revision',
|
||||
field=models.CharField(blank=True, help_text='Part revision or version number', max_length=100, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='notes',
|
||||
field=markdownx.models.MarkdownxField(blank=True, help_text='Part notes - supports Markdown formatting', null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='units',
|
||||
field=models.CharField(blank=True, default='', help_text='Stock keeping units for this part', max_length=20, null=True),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user