Report Migration Fix (#7296)

* Fix "unique" attribute on "name" field in ReportTemplate

- Already covered by "unique_together"

* Fix label migration file
This commit is contained in:
Oliver 2024-05-22 11:16:00 +10:00 committed by GitHub
parent aa39582d89
commit cc423e9143
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 3 deletions

View File

@ -20,7 +20,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('metadata', models.JSONField(blank=True, help_text='JSON metadata field, for use by external plugins', null=True, verbose_name='Plugin Metadata')),
('name', models.CharField(help_text='Template name', unique=True, max_length=100, verbose_name='Name')),
('name', models.CharField(help_text='Template name', max_length=100, verbose_name='Name')),
('template', models.FileField(help_text='Template file', upload_to='report/report', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html', 'htm'])], verbose_name='Template')),
('description', models.CharField(help_text='Template description', max_length=250, verbose_name='Description')),
('revision', models.PositiveIntegerField(default=1, editable=False, help_text='Revision number (auto-increments)', verbose_name='Revision')),

View File

@ -19,7 +19,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('metadata', models.JSONField(blank=True, help_text='JSON metadata field, for use by external plugins', null=True, verbose_name='Plugin Metadata')),
('name', models.CharField(help_text='Template name', max_length=100, unique=True, verbose_name='Name')),
('name', models.CharField(help_text='Template name', max_length=100, verbose_name='Name')),
('description', models.CharField(help_text='Template description', max_length=250, verbose_name='Description')),
('template', models.FileField(help_text='Template file', upload_to='report/label', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html', 'htm'])], verbose_name='Template')),
('revision', models.PositiveIntegerField(default=1, editable=False, help_text='Revision number (auto-increments)', verbose_name='Revision')),

View File

@ -148,7 +148,6 @@ class ReportTemplateBase(MetadataMixin, InvenTree.models.InvenTreeModel):
max_length=100,
verbose_name=_('Name'),
help_text=_('Template name'),
unique=True,
)
description = models.CharField(