From e88387453ab0cdaa225988ce102e94a95f47d1c7 Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Tue, 17 Mar 2026 18:33:03 +0200 Subject: [PATCH 1/2] =?UTF-8?q?kin:=20KIN-OBS-023=20=D0=A1=D0=BE=D0=B3?= =?UTF-8?q?=D0=BB=D0=B0=D1=81=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D0=B4=D0=B5=D0=BD=D0=B8=D0=B5=20/api/pipelines/{id?= =?UTF-8?q?}/logs=20=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=B5=D1=81=D1=83=D1=89?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B2=D1=83=D1=8E=D1=89=D0=B5=D0=B3=D0=BE=20?= =?UTF-8?q?pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/api.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/api.py b/web/api.py index 03bd387..ba5fcbf 100644 --- a/web/api.py +++ b/web/api.py @@ -7,6 +7,7 @@ import glob as _glob import logging import mimetypes import shutil +import sqlite3 import subprocess import sys import time @@ -445,9 +446,13 @@ def create_project_link(body: ProjectLinkCreate): if not models.get_project(conn, body.to_project): conn.close() raise HTTPException(404, f"Project '{body.to_project}' not found") - link = models.create_project_link( - conn, body.from_project, body.to_project, body.type, body.description - ) + try: + link = models.create_project_link( + conn, body.from_project, body.to_project, body.type, body.description + ) + except sqlite3.IntegrityError: + conn.close() + raise HTTPException(409, "Link already exists") conn.close() return link From 9f58682689a6073bc9a937a679e1f37024181d93 Mon Sep 17 00:00:00 2001 From: Gros Frumos Date: Tue, 17 Mar 2026 18:33:08 +0200 Subject: [PATCH 2/2] kin: auto-commit after pipeline