Temp Fix full name field

This commit is contained in:
zandercymatics 2024-05-10 13:12:57 -06:00
parent 3a47a7a61c
commit 5a60388a9c
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -6,6 +6,13 @@ from django.core.validators import MaxLengthValidator
class ContactForm(forms.Form):
"""Form for adding or editing a contact"""
def clean(self):
cleaned_data = super().clean()
# Remove the full name property
if "full_name" in cleaned_data:
del cleaned_data["full_name"]
return cleaned_data
def to_database(self, obj):
"""
Adds this form's cleaned data to `obj` and saves `obj`.