fix: null guard sync_records() in netbird_dns_zone

list_dns_zone_records() returns null for zones with no records,
causing TypeError when iterating. Same pattern fixed in #20 for
other modules — this one was missed.
This commit is contained in:
Jack Carter
2026-03-31 11:59:11 +02:00
parent 3b906fe499
commit 2e4efde08b
+1 -1
View File
@@ -220,7 +220,7 @@ def sync_records(api, module, zone_id, desired_records):
# Get current records
current_records, _ = api.list_dns_zone_records(zone_id)
current_by_key = {get_record_key(r): r for r in current_records}
current_by_key = {get_record_key(r): r for r in (current_records or [])}
# Build desired records map
desired_by_key = {}