mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-14 21:45:37 -05:00
Also ensure API key is set
This commit is contained in:
@@ -5,10 +5,12 @@ from django.core.checks import register
|
|||||||
|
|
||||||
@register()
|
@register()
|
||||||
def check_remote_parser_configured(app_configs, **kwargs):
|
def check_remote_parser_configured(app_configs, **kwargs):
|
||||||
if settings.REMOTE_OCR_ENGINE == "azureai" and not settings.REMOTE_OCR_ENDPOINT:
|
if settings.REMOTE_OCR_ENGINE == "azureai" and not (
|
||||||
|
settings.REMOTE_OCR_ENDPOINT and settings.REMOTE_OCR_API_KEY
|
||||||
|
):
|
||||||
return [
|
return [
|
||||||
Error(
|
Error(
|
||||||
"Azure AI remote parser requires endpoint to be configured.",
|
"Azure AI remote parser requires endpoint and API key to be configured.",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user