Skip to content
Snippets Groups Projects
Commit fca352c3 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Add dir to job creation.

parent 6f8a8dbc
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,11 @@ def service(service_handle):
''' TODO: Use secure filename '''
filename = secure_filename(file.filename)
file.save(os.path.join(dir, filename))
job_input = JobInput(filename=filename, job=job)
job_input = JobInput(
dir=os.path.join(str(job.user_id), 'jobs', str(job.id)),
filename=filename,
job=job
)
db.session.add(job_input)
job.status = 'submitted'
db.session.commit()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment