From 41d79ba94361b549eba8dc17e32afa251f095d9c Mon Sep 17 00:00:00 2001 From: Jonas Lammler Date: Thu, 17 Sep 2026 09:38:49 +0200 Subject: [PATCH] fix: only send load balancer service health_check properties when defined The code was sending all the health_check properties unconditionally, which prevented from falling back on API defaults or to partially update the health_check values. --- hcloud/load_balancers/domain.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hcloud/load_balancers/domain.py b/hcloud/load_balancers/domain.py index 6d3af62d..1782f9e9 100644 --- a/hcloud/load_balancers/domain.py +++ b/hcloud/load_balancers/domain.py @@ -222,13 +222,7 @@ def to_payload(self) -> dict[str, Any]: payload["http"] = http if self.health_check is not None: - health_check: dict[str, Any] = { - "protocol": self.health_check.protocol, - "port": self.health_check.port, - "interval": self.health_check.interval, - "timeout": self.health_check.timeout, - "retries": self.health_check.retries, - } + health_check: dict[str, Any] = {} if self.health_check.protocol is not None: health_check["protocol"] = self.health_check.protocol if self.health_check.port is not None: