mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Bug fixed when sending yourself a test the back button links to the correct url.
Remove traceback.
This commit is contained in:
@@ -205,7 +205,6 @@ def send_from_api(service_id, template_id):
|
||||
@login_required
|
||||
@user_has_permissions('send_texts', 'send_emails', 'send_letters')
|
||||
def check_messages(service_id, template_type, upload_id):
|
||||
|
||||
if not session.get('upload_data'):
|
||||
return redirect(url_for('main.choose_template', service_id=service_id, template_type=template_type))
|
||||
|
||||
@@ -239,8 +238,9 @@ def check_messages(service_id, template_type, upload_id):
|
||||
)
|
||||
|
||||
if request.args.get('from_test') and len(template.placeholders):
|
||||
extra_args = {'help': 1} if request.args.get('help') else {}
|
||||
back_link = url_for(
|
||||
'.send_test', service_id=service_id, template_id=template.id, help=1 if request.args.get('help') else 0
|
||||
'.send_test', service_id=service_id, template_id=template.id, **extra_args
|
||||
)
|
||||
else:
|
||||
back_link = url_for('.send_messages', service_id=service_id, template_id=template.id)
|
||||
|
||||
Reference in New Issue
Block a user