From 0ebf0f516dfccd42b9565689a895092c3bf04253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Chali=C5=84ski?= Date: Mon, 29 Jan 2024 16:10:48 +0100 Subject: [PATCH] get_ticket_id fix crash on missing url --- scripts/python/get_ticket_id.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/python/get_ticket_id.py b/scripts/python/get_ticket_id.py index e9660ed6b..9ac65b1de 100644 --- a/scripts/python/get_ticket_id.py +++ b/scripts/python/get_ticket_id.py @@ -2,5 +2,5 @@ project_items = json.load(sys.stdin)["items"] pr_url = sys.argv[1] -[id] = [item["id"] for item in project_items if item["content"]["url"] == pr_url] +[id] = [item["id"] for item in project_items if ("url" in item["content"] and item["content"]["url"] == pr_url)] print(id)