clean up some String casting in making a cname that isnt needed
This commit is contained in:
parent
fc971391b9
commit
751dae3356
|
@ -74,7 +74,7 @@ def add_cname_record(dns_server, zone_name, originating_record, cname, ttl, key_
|
|||
keyring = keyutils.create_keyring(this_key.name, this_key.data)
|
||||
|
||||
update = dns.update.Update(zone_name, keyring = keyring)
|
||||
update.replace(cname, int(ttl), 'CNAME', originating_record + ".")
|
||||
update.replace(cname, ttl, 'CNAME', originating_record + ".")
|
||||
response = dns.query.tcp(update, dns_server)
|
||||
|
||||
return [{ "description" : "CNAME %s.%s points to %s" % (cname, zone_name, originating_record),
|
||||
|
|
|
@ -99,12 +99,12 @@ def view_add_cname_result(request):
|
|||
if form.is_valid():
|
||||
cd = form.cleaned_data
|
||||
add_cname_response = helpers.add_cname_record(
|
||||
str(cd["dns_server"]),
|
||||
str(cd["zone_name"]),
|
||||
str(cd["originating_record"]),
|
||||
str(cd["cname"]),
|
||||
str(cd["ttl"]),
|
||||
str(cd["key_name"]))
|
||||
cd["dns_server"],
|
||||
cd["zone_name"],
|
||||
str(cd["originating_record"]), # This needs to be cast as a String for some reason.
|
||||
cd["cname"],
|
||||
cd["ttl"],
|
||||
cd["key_name"])
|
||||
|
||||
return render(request, "bcommon/response_result.htm",
|
||||
{"response" : add_cname_response })
|
||||
|
|
Loading…
Reference in New Issue