Merge pull request #1842 from GSA/invite_redis

fix minor bug where subject is missing
This commit is contained in:
ccostino
2025-07-18 13:18:14 -04:00
committed by GitHub

View File

@@ -189,8 +189,9 @@ def preview_template_by_id_and_service_id(service_id, template_id):
},
status_code=400,
)
data["subject"] = template_object.subject
# Only emails have subjects, SMS do not
if hasattr(template_object, "subject"):
data["subject"] = template_object.subject
data["content"] = template_object.content_with_placeholders_filled_in
return jsonify(data)