diff --git a/src/lib/components/admin/Settings/Documents.svelte b/src/lib/components/admin/Settings/Documents.svelte index fcc5afe44c..ed314e658b 100644 --- a/src/lib/components/admin/Settings/Documents.svelte +++ b/src/lib/components/admin/Settings/Documents.svelte @@ -161,11 +161,10 @@ toast.error($i18n.t('Docling Server URL required.')); return; } - if ( - RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' && - (RAGConfig.DOCLING_OCR_ENGINE !== '' || RAGConfig.DOCLING_OCR_LANG !== '') - ) { - toast.error($i18n.t('Docling OCR Engine and Language(s) required.')); + if (RAGConfig.CONTENT_EXTRACTION_ENGINE === 'docling' && + ((RAGConfig.DOCLING_OCR_ENGINE === '' && RAGConfig.DOCLING_OCR_LANG !== '') || + (RAGConfig.DOCLING_OCR_ENGINE !== '' && RAGConfig.DOCLING_OCR_LANG === ''))) { + toast.error($i18n.t('Both Docling OCR Engine and Language(s) must be provided or both left empty.')); return; }