From b1226486ed5fa9ecebc64023c90ca060d90404af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Mon, 17 Jun 2024 13:23:19 +0200 Subject: [PATCH] Fix None job in logs URL --- github_app_geo_project/views/webhook.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/github_app_geo_project/views/webhook.py b/github_app_geo_project/views/webhook.py index d7a31261421..5cf34fabc56 100644 --- a/github_app_geo_project/views/webhook.py +++ b/github_app_geo_project/views/webhook.py @@ -279,6 +279,9 @@ def create_checks( sub_name: str | None = None, ) -> github.CheckRun.CheckRun: """Create the GitHub check run.""" + # Get the job id from the database + session.flush() + service_url = service_url if service_url.endswith("/") else service_url + "/" service_url = urllib.parse.urljoin(service_url, "logs/") service_url = urllib.parse.urljoin(service_url, str(job.id))