mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 16:32:15 +02:00
fix linting errors
This commit is contained in:
parent
8adda8d327
commit
7d42c5e63b
2 changed files with 3 additions and 9 deletions
|
@ -7,6 +7,7 @@ from phonenumber_field.widgets import RegionalPhoneNumberWidget
|
|||
|
||||
from ..models import Contact
|
||||
|
||||
|
||||
class DomainAddUserForm(forms.Form):
|
||||
|
||||
"""Form for adding a user to a domain."""
|
||||
|
@ -46,19 +47,13 @@ class ContactForm(forms.ModelForm):
|
|||
# the database fields have blank=True so ModelForm doesn't create
|
||||
# required fields by default. Use this list in __init__ to mark each
|
||||
# of these fields as required
|
||||
required = [
|
||||
"first_name",
|
||||
"last_name",
|
||||
"title",
|
||||
"email",
|
||||
"phone"
|
||||
]
|
||||
required = ["first_name", "last_name", "title", "email", "phone"]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# take off maxlength attribute for the phone number field
|
||||
# which interferes with out input_with_errors template tag
|
||||
self.fields['phone'].widget.attrs.pop('maxlength', None)
|
||||
self.fields["phone"].widget.attrs.pop("maxlength", None)
|
||||
|
||||
for field_name in self.required:
|
||||
self.fields[field_name].required = True
|
||||
|
|
|
@ -67,7 +67,6 @@ class DomainAuthorizingOfficialView(DomainPermission, FormMixin, DetailView):
|
|||
|
||||
def form_valid(self, form):
|
||||
"""The form is valid, save the authorizing official."""
|
||||
domain = self.get_object()
|
||||
form.save()
|
||||
|
||||
messages.success(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue