mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-03 01:33:32 +02:00
Fix DELETE getter in form's clean, add test_delete_other_contact_does_not_allow_zero_contacts, cleanup
This commit is contained in:
parent
eb7498b28e
commit
f2b12e01d0
3 changed files with 111 additions and 22 deletions
|
@ -672,7 +672,7 @@ class OtherContactsForm(RegistrarForm):
|
|||
deletion by formset to be considered valid even though certain required fields have
|
||||
not passed field validation
|
||||
"""
|
||||
if self.form_data_marked_for_deletion or self.cleaned_data["DELETE"]:
|
||||
if self.form_data_marked_for_deletion or self.cleaned_data.get("DELETE"):
|
||||
# clear any errors raised by the form fields
|
||||
# (before this clean() method is run, each field
|
||||
# performs its own clean, which could result in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue