From 26abcf5612694b41afd03880daecc9b49093efe0 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 11 Sep 2025 13:48:06 -0700 Subject: [PATCH] Also ensure API key is set --- src/paperless_remote/checks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/paperless_remote/checks.py b/src/paperless_remote/checks.py index ce72ebcc8..b9abb0592 100644 --- a/src/paperless_remote/checks.py +++ b/src/paperless_remote/checks.py @@ -5,10 +5,12 @@ from django.core.checks import register @register() 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 [ Error( - "Azure AI remote parser requires endpoint to be configured.", + "Azure AI remote parser requires endpoint and API key to be configured.", ), ]