Fix imports

This commit is contained in:
zandercymatics 2024-07-03 09:27:55 -06:00
parent 87c7a4dba2
commit 4bdf2cbe8f
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
3 changed files with 4 additions and 4 deletions

View file

@ -548,7 +548,6 @@ function initializeWidgetOnList(list, parentId) {
let actionNeededEmails = JSON.parse(document.getElementById('action-needed-emails-data').textContent) let actionNeededEmails = JSON.parse(document.getElementById('action-needed-emails-data').textContent)
let emailData = actionNeededEmails[reason]; let emailData = actionNeededEmails[reason];
if (emailData) { if (emailData) {
// TODO: do we need a revert to default button?
let emailBody = emailData.email_body_text let emailBody = emailData.email_body_text
if (emailBody) { if (emailBody) {
actionNeededEmail.value = emailBody actionNeededEmail.value = emailBody

View file

@ -10,7 +10,7 @@ from django.utils import timezone
from waffle import flag_is_active from waffle import flag_is_active
from registrar.models.domain import Domain from registrar.models.domain import Domain
from registrar.models.federal_agency import FederalAgency from registrar.models.federal_agency import FederalAgency
from registrar.models.utility.generic_helper import CreateOrUpdateOrganizationTypeHelper, convert_string_to_sha256_hash from registrar.models.utility.generic_helper import CreateOrUpdateOrganizationTypeHelper
from registrar.utility.errors import FSMDomainRequestError, FSMErrorCodes from registrar.utility.errors import FSMDomainRequestError, FSMErrorCodes
from registrar.utility.constants import BranchChoices from registrar.utility.constants import BranchChoices
@ -627,8 +627,7 @@ class DomainRequest(TimeStampedModel):
if was_already_action_needed and (reason_exists and reason_changed): if was_already_action_needed and (reason_exists and reason_changed):
# We don't send emails out in state "other" # We don't send emails out in state "other"
if self.action_needed_reason != self.ActionNeededReasons.OTHER: if self.action_needed_reason != self.ActionNeededReasons.OTHER:
_email_content = self.action_needed_reason_email self._send_action_needed_reason_email(email_content=self.action_needed_reason_email)
self._send_action_needed_reason_email(email_content=_email_content)
def sync_yes_no_form_fields(self): def sync_yes_no_form_fields(self):
"""Some yes/no forms use a db field to track whether it was checked or not. """Some yes/no forms use a db field to track whether it was checked or not.

View file

@ -45,6 +45,8 @@ def send_templated_email(
template = get_template(template_name) template = get_template(template_name)
email_body = template.render(context=context) email_body = template.render(context=context)
# Do cleanup on the email body. Mostly for emails with custom content.
if email_body: if email_body:
email_body.strip().lstrip("\n") email_body.strip().lstrip("\n")