fix: need to get row id to start jobs automatically
This commit is contained in:
parent
e2f3e18dff
commit
2201a5384b
1 changed files with 2 additions and 2 deletions
|
@ -98,12 +98,12 @@ def create_file(location: Optional[str] = None):
|
||||||
return {"error": "file exists already"}, 409
|
return {"error": "file exists already"}, 409
|
||||||
|
|
||||||
file.save(sanitized_path)
|
file.save(sanitized_path)
|
||||||
fid = ctx.db.create_file(
|
row = ctx.db.create_file(
|
||||||
uid=ctx.uid, filename=file.filename, path=sanitized_path
|
uid=ctx.uid, filename=file.filename, path=sanitized_path
|
||||||
)
|
)
|
||||||
|
|
||||||
if request.form.get("print", "").lower() == "true":
|
if request.form.get("print", "").lower() == "true":
|
||||||
ctx.db.create_job(uid=ctx.uid, fid=fid)
|
ctx.db.create_job(uid=ctx.uid, fid=row.id)
|
||||||
|
|
||||||
return {"status": "ok"}, 202
|
return {"status": "ok"}, 202
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue