From 68e106ade51f58616aceaf3bd671a128ddfbcced Mon Sep 17 00:00:00 2001 From: taylanbakircioglu Date: Thu, 13 Nov 2025 22:54:47 +0300 Subject: [PATCH] fix: SSL certificate update KeyError - use is_global variable instead of existing['is_global'] --- backend/routers/ssl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/routers/ssl.py b/backend/routers/ssl.py index 2c5f686..c239b1a 100644 --- a/backend/routers/ssl.py +++ b/backend/routers/ssl.py @@ -896,7 +896,7 @@ async def update_ssl_certificate(cert_id: int, certificate: SSLCertificateUpdate # Determine affected clusters for config version creation affected_clusters = [] - if existing['is_global']: + if is_global: # For global SSL certificates, update ALL active clusters clusters = await conn.fetch("SELECT id FROM haproxy_clusters WHERE is_active = TRUE") affected_clusters = [cluster['id'] for cluster in clusters] @@ -1062,7 +1062,7 @@ async def update_ssl_certificate(cert_id: int, certificate: SSLCertificateUpdate resource_id=str(cert_id), details={ 'certificate_name': certificate.name or existing['name'], - 'is_global': existing['is_global'], + 'is_global': is_global, 'content_updated': content_updated, 'affected_clusters': len(affected_clusters) if affected_clusters else 0, 'sync_results': len(sync_results)