Fixed models and added migrations

This commit is contained in:
CocoByte 2024-02-23 16:30:50 -07:00
parent cc2e24d451
commit 183c4cdeb7
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F
7 changed files with 877 additions and 6 deletions

View file

@ -8,6 +8,7 @@ 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."""
@ -69,8 +70,8 @@ class PublicContact(TimeStampedModel):
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 = models.PhoneNumberField(null=False, help_text="Contact's phone number. Must be in ITU.E164.2005 format")
fax = models.PhoneNumberField(
voice = PhoneNumberField(null=False, help_text="Contact's phone number. Must be in ITU.E164.2005 format")
fax = PhoneNumberField(
null=True,
help_text="Contact's fax number (null ok). Must be in ITU.E164.2005 format.",
)