Skip to content

Commit

Permalink
Merge pull request cloudflare#65 from xens/keep_proxied_state
Browse files Browse the repository at this point in the history
Keep proxied state during IP-address update
  • Loading branch information
mahtin committed Feb 9, 2020
2 parents b3809fe + a47bfcb commit adfc471
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/example_update_dynamic_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,16 @@ def do_dns_update(cf, zone_name, zone_id, dns_name, ip_address, ip_address_type)
updated = True
continue

proxied_state = dns_record['proxied']

# Yes, we need to update this record - we know it's the same address type

dns_record_id = dns_record['id']
dns_record = {
'name':dns_name,
'type':ip_address_type,
'content':ip_address
'content':ip_address,
'proxied':proxied_state
}
try:
dns_record = cf.zones.dns_records.put(zone_id, dns_record_id, data=dns_record)
Expand Down

0 comments on commit adfc471

Please sign in to comment.