Fix: create the scratch dir before zone OCR renders into it

This commit is contained in:
stumpylog committed 2026-11-20 09:38:50 -08:00
1 parent 5182b719c5
commit 0348dc532f
2 files changed
+3

No files matched your search

+1
View File
@@ -5926,6 +5926,7 @@ class OcrTemplateViewSet(BulkPermissionMixin, PassUserMixin, ModelViewSet[OcrTem
content_type=file_doc.mime_type,
)
settings.SCRATCH_DIR.mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory(dir=settings.SCRATCH_DIR) as tmp_dir:
rendered = Path(tmp_dir) / "page.png"
try: