mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Fix exception when job is submitted without a name
This commit is contained in:
@@ -269,7 +269,7 @@ def add_job_handler():
|
|||||||
job['input_path'] = uploaded_file_local_path
|
job['input_path'] = uploaded_file_local_path
|
||||||
output_dir = os.path.join(job_dir, job.get('name', None) or 'output')
|
output_dir = os.path.join(job_dir, job.get('name', None) or 'output')
|
||||||
os.makedirs(output_dir, exist_ok=True)
|
os.makedirs(output_dir, exist_ok=True)
|
||||||
job['output_path'] = os.path.join(output_dir, os.path.basename(job.get('name', job['output_path'])))
|
job['output_path'] = os.path.join(output_dir, os.path.basename(job.get('name', None) or job['output_path']))
|
||||||
remove_job_dir = len(jobs_list) == 1 and uploaded_file_local_path # remove failed job dir for single file uploads only
|
remove_job_dir = len(jobs_list) == 1 and uploaded_file_local_path # remove failed job dir for single file uploads only
|
||||||
add_result = add_job(job, remove_job_dir_on_failure=remove_job_dir)
|
add_result = add_job(job, remove_job_dir_on_failure=remove_job_dir)
|
||||||
results.append(add_result)
|
results.append(add_result)
|
||||||
|
|||||||
Reference in New Issue
Block a user