kin: KIN-UI-007 Scroll to bottom при получении новых сообщений через polling

This commit is contained in:
Gros Frumos 2026-03-16 19:41:38 +02:00
parent 98d62266ba
commit bd9fbfbbcb
2 changed files with 21 additions and 2 deletions

View file

@ -1228,7 +1228,15 @@ def patch_environment(project_id: str, env_id: int, body: EnvironmentPatch):
if body.is_installed is not None:
fields["is_installed"] = int(body.is_installed)
updated = models.update_environment(conn, env_id, **fields)
try:
updated = models.update_environment(conn, env_id, **fields)
except Exception as e:
conn.close()
if "UNIQUE constraint" in str(e):
raise HTTPException(409, f"Environment name already exists for this project")
if "KIN_SECRET_KEY" in str(e):
raise HTTPException(503, "Server misconfiguration: KIN_SECRET_KEY is not set. Contact admin.")
raise HTTPException(500, str(e))
scan_task_id = None
if body.is_installed is True and not was_installed: