fix(monitoring): add missing conditions array to DNS monitors

Uptime Kuma 1.23+ evaluates monitor.conditions.length internally.
While HTTP monitors seem to bypass this check safely if conditions is null,
DNS monitors crash the NodeJS backend with 'Cannot read properties of null (reading length)'
if conditions is not explicitly initialized as an empty array.
This commit is contained in:
Murat ÖZDEMİR 2026-06-26 23:54:20 +03:00
parent 6f3bf6cef1
commit c290882492

View File

@ -265,6 +265,7 @@ def setup_uptime_kuma(dry_run=False, only=None):
"dns_resolve_type": dns_resolve_type,
"interval": interval,
"url": "https://",
"conditions": [],
}
if parent_group_id is not None:
kwargs["parent"] = parent_group_id
@ -286,6 +287,7 @@ def setup_uptime_kuma(dry_run=False, only=None):
"dns_resolve_type": dns_resolve_type,
"interval": interval,
"url": "https://",
"conditions": [],
}
if parent_group_id is not None:
kwargs["parent"] = parent_group_id