Skip to content

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

Ensure the scratch directory exists before consuming this source (#5579)

Trenton H2aea220c6d76
diff --git a/src/documents/management/commands/document_consumer.py b/src/documents/management/commands/document_consumer.py
index 16bcf9bd9..919530544 100644
--- a/src/documents/management/commands/document_consumer.py
+++ b/src/documents/management/commands/document_consumer.py
@@ -232,6 +232,9 @@ class Command(BaseCommand):
if not os.path.isdir(directory):
raise CommandError(f"Consumption directory {directory} does not exist")
+ # Consumer will need this
+ settings.SCRATCH_DIR.mkdir(parents=True, exist_ok=True)
+
if recursive:
for dirpath, _, filenames in os.walk(directory):
for filename in filenames: