clean up some String casting in making a cname that isnt needed

This commit is contained in:
Jeffrey Forman 2012-11-21 20:39:08 -05:00
parent fc971391b9
commit 751dae3356
2 changed files with 7 additions and 7 deletions

View File

@ -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),

View File

@ -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 })