Fixed bug that caused the root domain to not update
This commit is contained in:
parent
464d2792b1
commit
0e0e9f9989
@ -106,9 +106,12 @@ def commitRecord(ip):
|
|||||||
ttl = 300 # default Cloudflare TTL
|
ttl = 300 # default Cloudflare TTL
|
||||||
for subdomain in subdomains:
|
for subdomain in subdomains:
|
||||||
subdomain = subdomain.lower().strip()
|
subdomain = subdomain.lower().strip()
|
||||||
|
fqdn = base_domain_name
|
||||||
|
if subdomain != '':
|
||||||
|
fqdn = subdomain + "." + base_domain_name
|
||||||
record = {
|
record = {
|
||||||
"type": ip["type"],
|
"type": ip["type"],
|
||||||
"name": subdomain,
|
"name": fqdn,
|
||||||
"content": ip["ip"],
|
"content": ip["ip"],
|
||||||
"proxied": option["proxied"],
|
"proxied": option["proxied"],
|
||||||
"ttl": ttl
|
"ttl": ttl
|
||||||
@ -117,9 +120,6 @@ def commitRecord(ip):
|
|||||||
"zones/" + option['zone_id'] +
|
"zones/" + option['zone_id'] +
|
||||||
"/dns_records?per_page=100&type=" + ip["type"],
|
"/dns_records?per_page=100&type=" + ip["type"],
|
||||||
"GET", option)
|
"GET", option)
|
||||||
fqdn = base_domain_name
|
|
||||||
if subdomain:
|
|
||||||
fqdn = subdomain + "." + base_domain_name
|
|
||||||
identifier = None
|
identifier = None
|
||||||
modified = False
|
modified = False
|
||||||
duplicate_ids = []
|
duplicate_ids = []
|
||||||
|
|||||||
Reference in New Issue
Block a user