mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 19:48:36 +02:00
Merge branch 'main' into za/additional-data-transferred-domains
This commit is contained in:
commit
cfaafb8ef3
70 changed files with 575 additions and 1675 deletions
|
@ -131,8 +131,7 @@ class DomainApplication(TimeStampedModel):
|
|||
|
||||
FEDERAL = (
|
||||
"federal",
|
||||
"Federal: an agency of the U.S. government's executive, "
|
||||
"legislative, or judicial branches",
|
||||
"Federal: an agency of the U.S. government's executive, legislative, or judicial branches",
|
||||
)
|
||||
INTERSTATE = "interstate", "Interstate: an organization of two or more states"
|
||||
STATE_OR_TERRITORY = (
|
||||
|
@ -143,8 +142,7 @@ class DomainApplication(TimeStampedModel):
|
|||
)
|
||||
TRIBAL = (
|
||||
"tribal",
|
||||
"Tribal: a tribal government recognized by the federal or a state "
|
||||
"government",
|
||||
"Tribal: a tribal government recognized by the federal or a state government",
|
||||
)
|
||||
COUNTY = "county", "County: a county, parish, or borough"
|
||||
CITY = "city", "City: a city, town, township, village, etc."
|
||||
|
@ -154,8 +152,7 @@ class DomainApplication(TimeStampedModel):
|
|||
)
|
||||
SCHOOL_DISTRICT = (
|
||||
"school_district",
|
||||
"School district: a school district that is not part of a local "
|
||||
"government",
|
||||
"School district: a school district that is not part of a local government",
|
||||
)
|
||||
|
||||
class BranchChoices(models.TextChoices):
|
||||
|
@ -572,9 +569,7 @@ class DomainApplication(TimeStampedModel):
|
|||
return not self.approved_domain.is_active()
|
||||
return True
|
||||
|
||||
def _send_status_update_email(
|
||||
self, new_status, email_template, email_template_subject
|
||||
):
|
||||
def _send_status_update_email(self, new_status, email_template, email_template_subject):
|
||||
"""Send a atatus update email to the submitter.
|
||||
|
||||
The email goes to the email address that the submitter gave as their
|
||||
|
@ -583,9 +578,7 @@ class DomainApplication(TimeStampedModel):
|
|||
"""
|
||||
|
||||
if self.submitter is None or self.submitter.email is None:
|
||||
logger.warning(
|
||||
f"Cannot send {new_status} email, no submitter email address."
|
||||
)
|
||||
logger.warning(f"Cannot send {new_status} email, no submitter email address.")
|
||||
return
|
||||
try:
|
||||
send_templated_email(
|
||||
|
@ -598,9 +591,7 @@ class DomainApplication(TimeStampedModel):
|
|||
except EmailSendingError:
|
||||
logger.warning("Failed to send confirmation email", exc_info=True)
|
||||
|
||||
@transition(
|
||||
field="status", source=[STARTED, ACTION_NEEDED, WITHDRAWN], target=SUBMITTED
|
||||
)
|
||||
@transition(field="status", source=[STARTED, ACTION_NEEDED, WITHDRAWN], target=SUBMITTED)
|
||||
def submit(self):
|
||||
"""Submit an application that is started.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue