mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-11 04:33:52 -04:00
Remove redundant call to get_template
We’re getting the template just to get back its `id`, which is the one thing we do know in order to get it. The call to get template is still happening inside `_check_messages`, so we’ll still catch someone trying to look at this page for a template that doesn’t exist.
This commit is contained in:
@@ -589,9 +589,8 @@ def _check_messages(service_id, template_id, upload_id, preview_row, letters_as_
|
||||
@login_required
|
||||
@user_has_permissions('send_messages', restrict_admin_usage=True)
|
||||
def check_messages(service_id, template_id, upload_id, row_index=2):
|
||||
db_template = service_api_client.get_service_template(service_id, template_id)['data']
|
||||
|
||||
data = _check_messages(service_id, db_template['id'], upload_id, row_index)
|
||||
data = _check_messages(service_id, template_id, upload_id, row_index)
|
||||
|
||||
if (
|
||||
data['recipients'].too_many_rows or
|
||||
|
||||
Reference in New Issue
Block a user