From d67caab5aeba80825a1f06ae1f812473f3c9e489 Mon Sep 17 00:00:00 2001 From: Christian Merten Date: Mon, 18 Nov 2024 00:31:19 +0100 Subject: [PATCH] mailer: make attachment file field mandatory --- .../migrations/0004_alter_attachment_f.py | 19 +++++++++++++++++++ jdav_web/mailer/models.py | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 jdav_web/mailer/migrations/0004_alter_attachment_f.py diff --git a/jdav_web/mailer/migrations/0004_alter_attachment_f.py b/jdav_web/mailer/migrations/0004_alter_attachment_f.py new file mode 100644 index 0000000..d92419c --- /dev/null +++ b/jdav_web/mailer/migrations/0004_alter_attachment_f.py @@ -0,0 +1,19 @@ +# Generated by Django 4.0.1 on 2024-11-17 23:31 + +from django.db import migrations +import utils + + +class Migration(migrations.Migration): + + dependencies = [ + ('mailer', '0003_alter_message_options'), + ] + + operations = [ + migrations.AlterField( + model_name='attachment', + name='f', + field=utils.RestrictedFileField(upload_to='attachments', verbose_name='file'), + ), + ] diff --git a/jdav_web/mailer/models.py b/jdav_web/mailer/models.py index c3b1584..6625dce 100644 --- a/jdav_web/mailer/models.py +++ b/jdav_web/mailer/models.py @@ -207,7 +207,6 @@ class Attachment(CommonModel): # file (not naming it file because of builtin) f = RestrictedFileField(_('file'), upload_to='attachments', - blank=True, max_upload_size=10) def __str__(self):