Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Inreases the length to 5, allowing for commas as well as values (#4719)

Trenton H64cfc43891fb
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}",
)