kin: KIN-UI-007 Scroll to bottom при получении новых сообщений через polling
This commit is contained in:
parent
98d62266ba
commit
bd9fbfbbcb
2 changed files with 21 additions and 2 deletions
10
web/api.py
10
web/api.py
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue