mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 09:21:54 +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."""
|
||||
|
||||
# Set the nameservers from the formset
|
||||
dnssecdata = []
|
||||
dnssecdata = {"dsData":[]}
|
||||
|
||||
for form in formset:
|
||||
try:
|
||||
# TODO: build the right list of dicts to be passed
|
||||
dsrecord = (form.cleaned_data["dsrecord"],)
|
||||
dnssecdata.append(dsrecord)
|
||||
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:
|
||||
# no server information in this field, skip it
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue