From b7cece97ad89ef97aaa7e8f05531ca372eb9edbc Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 18 Jul 2025 09:50:36 -0700 Subject: [PATCH] fix minor bug where subject is missing --- app/template/rest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/template/rest.py b/app/template/rest.py index 65faecef9..23184026a 100644 --- a/app/template/rest.py +++ b/app/template/rest.py @@ -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)