PartAttachment attachment file is actually required!

This commit is contained in:
Oliver Walters 2019-05-18 16:28:15 +10:00
parent a1461de297
commit 92632b2ef7
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 2.2 on 2019-05-18 06:27
from django.db import migrations, models
import part.models
class Migration(migrations.Migration):
dependencies = [
('part', '0027_auto_20190518_1620'),
]
operations = [
migrations.AlterField(
model_name='partattachment',
name='attachment',
field=models.FileField(help_text='Select file to attach', upload_to=part.models.attach_file),
),
]

View File

@ -641,7 +641,7 @@ class PartAttachment(models.Model):
part = models.ForeignKey(Part, on_delete=models.CASCADE,
related_name='attachments')
attachment = models.FileField(upload_to=attach_file, null=True, blank=True,
attachment = models.FileField(upload_to=attach_file,
help_text='Select file to attach')
comment = models.CharField(max_length=100, help_text='File comment')