mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-07 00:27:12 +00:00
If the selected OCR mode is not a valid choice, warn and default to auto instead
This commit is contained in:
1 parent
4138319832
commit
7f01b3a6f9
1 file changed
+4
@@ -889,6 +889,10 @@ OCR_LANGUAGE = os.getenv("PAPERLESS_OCR_LANGUAGE", "eng")
|
||||
# OCRmyPDF --output-type options are available.
|
||||
OCR_OUTPUT_TYPE = os.getenv("PAPERLESS_OCR_OUTPUT_TYPE", "pdfa")
|
||||
|
||||
_ocr_mode_raw = os.environ.get("PAPERLESS_OCR_MODE", "")
|
||||
if _ocr_mode_raw in ("skip", "skip_noarchive"):
|
||||
os.environ["PAPERLESS_OCR_MODE"] = "auto"
|
||||
|
||||
OCR_MODE = get_choice_from_env(
|
||||
"PAPERLESS_OCR_MODE",
|
||||
{"auto", "force", "redo", "off"},
|
||||
|
||||
Reference in new issue
Block a user