mirror of
https://github.com/netbirdio/ansible-netbird.git
synced 2026-05-22 18:43:36 -07:00
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:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user