From f4b51536dd61d8f28357a61a4e2577b12e5c1e83 Mon Sep 17 00:00:00 2001 From: arijiiiitttt Date: Mon, 23 Nov 2026 17:58:24 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20delivery=20Error=20in=20scan=5Fsingle=5F?= =?UTF-8?q?package:=20No=20connection=20adapters=20were=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scanpipe/pipelines/scan_single_package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scanpipe/pipelines/scan_single_package.py b/scanpipe/pipelines/scan_single_package.py index 605ef0ea5d..4bba196022 100644 --- a/scanpipe/pipelines/scan_single_package.py +++ b/scanpipe/pipelines/scan_single_package.py @@ -22,6 +22,7 @@ import json +from django.conf import settings from django.core.serializers.json import DjangoJSONEncoder from commoncode.hash import multi_checksums @@ -137,3 +138,15 @@ def make_summary_from_scan_results(self): with output_file.open("w") as summary_file: summary_file.write(json.dumps(summary, indent=2, cls=DjangoJSONEncoder)) + + # Ensure SITE_URL is properly configured for notifications + if not settings.SITE_URL: + self.project.add_error( + description="SITE_URL is not configured. Notifications may fail.", + model=self.pipeline_name, + details={ + "error_type": "ConfigurationError", + "setting": "SITE_URL", + "recommendation": "Set SITE_URL in your Django settings or environment variables (e.g., http://localhost:8001/)." + } + )