diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 09eea1906..15f72b113 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -31,7 +31,11 @@ def add_service_template(service_id, template_type): if form.validate_on_submit(): tdao.insert_service_template( - form.name.data, template_type, form.template_content.data, service_id, form.subject.data or None + form.name.data, + template_type, + form.template_content.data, + service_id, + form.subject.data if hasattr(form, 'subject') else None ) return redirect( url_for('.choose_template', service_id=service_id, template_type=template_type) diff --git a/app/templates/views/edit-email-template.html b/app/templates/views/edit-email-template.html index b0c983f65..3f9ec239f 100644 --- a/app/templates/views/edit-email-template.html +++ b/app/templates/views/edit-email-template.html @@ -14,12 +14,8 @@