Skip to content

Commit e3bf6f2

Browse files
authored
fix: only send load balancer service health_check properties when defined (#691)
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.
1 parent f7b8a31 commit e3bf6f2

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎hcloud/load_balancers/domain.py‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,7 @@ def to_payload(self) -> dict[str, Any]:
222222
payload["http"] = http
223223

224224
if self.health_check is not None:
225-
health_check: dict[str, Any] = {
226-
"protocol": self.health_check.protocol,
227-
"port": self.health_check.port,
228-
"interval": self.health_check.interval,
229-
"timeout": self.health_check.timeout,
230-
"retries": self.health_check.retries,
231-
}
225+
health_check: dict[str, Any] = {}
232226
if self.health_check.protocol is not None:
233227
health_check["protocol"] = self.health_check.protocol
234228
if self.health_check.port is not None:

0 commit comments

Comments
 (0)