2
0
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:
Oliver Walters
2020-09-03 00:11:20 +10:00
parent 104b9d2d44
commit 34a334236a
2 changed files with 54 additions and 6 deletions

View 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),
),
]