added blanks to public_contact fields (to remove required-field error in frontend form)

This commit is contained in:
CocoByte 2024-03-06 15:13:11 -07:00
parent 96a11096ed
commit 2ee3df91b9
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F

View file

@ -8,8 +8,6 @@ from registrar.utility.enums import DefaultEmail
from .utility.time_stamped_model import TimeStampedModel
from phonenumber_field.modelfields import PhoneNumberField # type: ignore
def get_id():
"""Generate a 16 character registry ID with a low probability of collision."""
@ -62,17 +60,17 @@ class PublicContact(TimeStampedModel):
)
name = models.CharField(null=False, help_text="Contact's full name")
org = models.CharField(null=True, help_text="Contact's organization (null ok)")
org = models.CharField(null=True, blank=True, help_text="Contact's organization (null ok)")
street1 = models.CharField(null=False, help_text="Contact's street")
street2 = models.CharField(null=True, help_text="Contact's street (null ok)")
street3 = models.CharField(null=True, help_text="Contact's street (null ok)")
street2 = models.CharField(null=True, blank=True, help_text="Contact's street (null ok)")
street3 = models.CharField(null=True, blank=True, help_text="Contact's street (null ok)")
city = models.CharField(null=False, help_text="Contact's city")
sp = models.CharField(null=False, help_text="Contact's state or province")
pc = models.CharField(null=False, help_text="Contact's postal code")
cc = models.CharField(null=False, help_text="Contact's country code")
email = models.EmailField(null=False, help_text="Contact's email address")
voice = PhoneNumberField(null=False, help_text="Contact's phone number. Must be in ITU.E164.2005 format")
fax = PhoneNumberField(
email = models.CharField(null=False, help_text="Contact's email address")
voice = models.CharField(null=False, help_text="Contact's phone number. Must be in ITU.E164.2005 format")
fax = models.CharField(
null=True,
help_text="Contact's fax number (null ok). Must be in ITU.E164.2005 format.",
)