mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-16 06:24:12 +02:00
setter now working in rudimentary form
This commit is contained in:
parent
12ae675772
commit
99f272cd21
1 changed files with 9 additions and 3 deletions
|
@ -290,12 +290,18 @@ class DomainDsdataView(DomainPermissionView, FormMixin):
|
||||||
"""The formset is valid, perform something with it."""
|
"""The formset is valid, perform something with it."""
|
||||||
|
|
||||||
# Set the nameservers from the formset
|
# Set the nameservers from the formset
|
||||||
dnssecdata = []
|
dnssecdata = {"dsData":[]}
|
||||||
|
|
||||||
for form in formset:
|
for form in formset:
|
||||||
try:
|
try:
|
||||||
# TODO: build the right list of dicts to be passed
|
# TODO: build the right list of dicts to be passed
|
||||||
dsrecord = (form.cleaned_data["dsrecord"],)
|
dsrecord = {
|
||||||
dnssecdata.append(dsrecord)
|
"keyTag": form.cleaned_data["key_tag"],
|
||||||
|
"alg": form.cleaned_data["algorithm"],
|
||||||
|
"digestType": form.cleaned_data["digest_type"],
|
||||||
|
"digest": form.cleaned_data["digest"],
|
||||||
|
}
|
||||||
|
dnssecdata["dsData"].append(common.DSData(**dsrecord))
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# no server information in this field, skip it
|
# no server information in this field, skip it
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue