Fix deploy crash: use valid log status 'info' instead of 'warning'

The deployment_logs table has a CHECK constraint allowing only
'success', 'error', 'info'. Using 'warning' caused an IntegrityError
that crashed the entire deployment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 22:23:52 +01:00
parent 6c33753ada
commit 27c91eee95

View File

@@ -319,7 +319,7 @@ async def deploy_customer(db: Session, customer_id: int) -> dict[str, Any]:
ssl_ok = npm_result.get("ssl", False) if not npm_result.get("error") else False ssl_ok = npm_result.get("ssl", False) if not npm_result.get("error") else False
if not ssl_ok: if not ssl_ok:
_log_action( _log_action(
db, customer_id, "deploy", "warning", db, customer_id, "deploy", "info",
"SSL certificate not created automatically. " "SSL certificate not created automatically. "
"Please create it manually in NPM or ensure DNS resolves and port 80 is reachable, then re-deploy.", "Please create it manually in NPM or ensure DNS resolves and port 80 is reachable, then re-deploy.",
) )