]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Also ensure API key is set
authorshamoon <4887959+shamoon@users.noreply.github.com>
Thu, 11 Sep 2025 20:48:06 +0000 (13:48 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Thu, 11 Sep 2025 20:48:06 +0000 (13:48 -0700)
src/paperless_remote/checks.py

index ce72ebcc820884f24bd565b6af30eb231ef90fbc..b9abb059296abbd5644d834767051131f73574e3 100644 (file)
@@ -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.",
             ),
         ]