Strip newline

This commit is contained in:
zandercymatics 2024-06-20 12:29:12 -06:00
parent 32463dd7a7
commit 4c84ad8456
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 13 additions and 18 deletions

View file

@ -577,12 +577,9 @@ class DomainRequest(TimeStampedModel):
# Return the content of the rendered views
context = {"domain_request": self}
# autoescape off adds a newline to the beginning of the email.
# This is fine when the email is rendered, but we don't need this for display.
email_body_text = template.render(context=context).lstrip().lstrip("\n")
return {
"subject_text": subject_template.render(context=context),
"email_body_text": email_body_text
"email_body_text": template.render(context=context)
}