From b4ee0f173c89795896285e99456af7659c2c1ee6 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Wed, 13 Aug 2025 01:29:21 +0500 Subject: [PATCH] Fix Cloudflare proxy enable/disable functionality - Remove zone_id and id fields from DNS record update payload as they are not expected by Cloudflare API - Fix KeyError 'zone_id' when accessing DNS record properties that don't exist - Cloudflare API expects only the data fields in PUT request body, not the identifiers Fixes #1478 --- dns/dnsManager.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dns/dnsManager.py b/dns/dnsManager.py index 9cd45fa7f..379a8ac43 100644 --- a/dns/dnsManager.py +++ b/dns/dnsManager.py @@ -1118,14 +1118,11 @@ class DNSManager: new_r_proxied_flag = True for dns_record in dns_records: - r_zone_id = dns_record['zone_id'] - r_id = dns_record['id'] r_name = dns_record['name'] r_type = dns_record['type'] r_content = dns_record['content'] r_ttl = dns_record['ttl'] r_proxied = dns_record['proxied'] - r_proxiable = dns_record['proxiable'] if r_proxied == new_r_proxied_flag: # Nothing to do @@ -1134,8 +1131,6 @@ class DNSManager: dns_record_id = dns_record['id'] new_dns_record = { - 'zone_id': r_zone_id, - 'id': r_id, 'type': r_type, 'name': r_name, 'content': r_content,