From 64cfc43891fbc7da692c138e73922d45b2e12c8c Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Thu, 30 Nov 2023 07:00:54 -0800 Subject: [PATCH] Inreases the length to 5, allowing for commas as well as values (#4719) --- .../1041_alter_consumptiontemplate_sources.py | 22 +++++++++++++++++++ src/documents/models.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 src/documents/migrations/1041_alter_consumptiontemplate_sources.py diff --git a/src/documents/migrations/1041_alter_consumptiontemplate_sources.py b/src/documents/migrations/1041_alter_consumptiontemplate_sources.py new file mode 100644 index 000000000..c96dc53cf --- /dev/null +++ b/src/documents/migrations/1041_alter_consumptiontemplate_sources.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.7 on 2023-11-30 14:29 + +import multiselectfield.db.fields +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("documents", "1040_customfield_customfieldinstance_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="consumptiontemplate", + name="sources", + field=multiselectfield.db.fields.MultiSelectField( + choices=[(1, "Consume Folder"), (2, "Api Upload"), (3, "Mail Fetch")], + default="1,2,3", + max_length=5, + ), + ), + ] diff --git a/src/documents/models.py b/src/documents/models.py index 04a3230e6..c3eea0ac9 100644 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -754,7 +754,7 @@ class ConsumptionTemplate(models.Model): order = models.IntegerField(_("order"), default=0) sources = MultiSelectField( - max_length=3, + max_length=5, choices=DocumentSourceChoices.choices, default=f"{DocumentSource.ConsumeFolder},{DocumentSource.ApiUpload},{DocumentSource.MailFetch}", )