From 398a48304cba5c8f9cb4a09046e349f72acad8df Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 18 Sep 2025 07:18:08 -0700 Subject: [PATCH] cleanup --- app/main/views/send.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/main/views/send.py b/app/main/views/send.py index 954efb1d2..af9eb7df6 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -92,23 +92,17 @@ def get_example_csv_rows(template, use_example_as_example=True, submitted_fields ) -def msg(message): - print(message) # noqa - - @main.route( "/services//send//csv", methods=["GET", "POST"] ) @user_has_permissions(ServicePermission.SEND_MESSAGES, restrict_admin_usage=True) def send_messages(service_id, template_id): - msg("ENTER send_messages") notification_count = service_api_client.get_notification_count(service_id) remaining_messages = current_service.message_limit - notification_count db_template = current_service.get_template_with_user_permission_or_403( template_id, current_user ) - msg(f"GOT db_template {db_template}") email_reply_to = None sms_sender = None @@ -117,7 +111,7 @@ def send_messages(service_id, template_id): email_reply_to = get_email_reply_to_address_from_session() elif db_template["template_type"] == "sms": sms_sender = get_sms_sender_from_session() - msg("OKAY C") + if db_template["template_type"] not in current_service.available_template_types: return redirect( url_for( @@ -128,7 +122,6 @@ def send_messages(service_id, template_id): template_id=template_id, ) ) - msg("OKAY D") template = get_template( db_template, current_service, @@ -136,7 +129,6 @@ def send_messages(service_id, template_id): email_reply_to=email_reply_to, sms_sender=sms_sender, ) - msg("OKAY E") form = CsvUploadForm() if form.validate_on_submit(): try: @@ -183,7 +175,7 @@ def send_messages(service_id, template_id): error_message = Markup(error_message) # nosec flash(error_message) column_headings = get_spreadsheet_column_headings_from_template(template) - msg("OKAY F") + return render_template( "views/send.html", template=template,