merge from main

This commit is contained in:
Kenneth Kehl
2024-03-05 11:09:08 -08:00
8 changed files with 339 additions and 84 deletions

View File

@@ -171,6 +171,7 @@ def create_job(service_id):
raise InvalidRequest("Create job is not allowed: service is inactive ", 403)
data = request.get_json()
original_file_name = data.get("original_file_name")
data.update({"service": service_id})
try:
data.update(**get_job_metadata_from_s3(service_id, data["id"]))
@@ -193,6 +194,9 @@ def create_job(service_id):
data.update({"template_version": template.version})
job = job_schema.load(data)
# See admin #1148, for whatever reason schema loading doesn't load this
if original_file_name is not None:
job.original_file_name = original_file_name
if job.scheduled_for:
job.job_status = JobStatus.SCHEDULED