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:
parent
6f3bf6cef1
commit
c290882492
@ -265,6 +265,7 @@ def setup_uptime_kuma(dry_run=False, only=None):
|
|||||||
"dns_resolve_type": dns_resolve_type,
|
"dns_resolve_type": dns_resolve_type,
|
||||||
"interval": interval,
|
"interval": interval,
|
||||||
"url": "https://",
|
"url": "https://",
|
||||||
|
"conditions": [],
|
||||||
}
|
}
|
||||||
if parent_group_id is not None:
|
if parent_group_id is not None:
|
||||||
kwargs["parent"] = parent_group_id
|
kwargs["parent"] = parent_group_id
|
||||||
@ -286,6 +287,7 @@ def setup_uptime_kuma(dry_run=False, only=None):
|
|||||||
"dns_resolve_type": dns_resolve_type,
|
"dns_resolve_type": dns_resolve_type,
|
||||||
"interval": interval,
|
"interval": interval,
|
||||||
"url": "https://",
|
"url": "https://",
|
||||||
|
"conditions": [],
|
||||||
}
|
}
|
||||||
if parent_group_id is not None:
|
if parent_group_id is not None:
|
||||||
kwargs["parent"] = parent_group_id
|
kwargs["parent"] = parent_group_id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user