mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-22 00:49:23 -04:00
Don’t let people actually start a letter job
Who knows what would happen if a job with a letter template actually got into the database. `403`ing the page is a quick and dirty hack to stop this from happening.
This commit is contained in:
@@ -310,6 +310,14 @@ def start_job(service_id, upload_id):
|
||||
|
||||
session.pop('upload_data')
|
||||
|
||||
template = service_api_client.get_service_template(
|
||||
service_id,
|
||||
upload_data.get('template_id')
|
||||
)['data']
|
||||
|
||||
if template['template_type'] == 'letter':
|
||||
abort(403)
|
||||
|
||||
job_api_client.create_job(
|
||||
upload_id,
|
||||
service_id,
|
||||
|
||||
Reference in New Issue
Block a user