fix: need to get row id to start jobs automatically

This commit is contained in:
Reid 'arrdem' McKenzie 2023-06-05 01:07:47 -06:00
parent e2f3e18dff
commit 2201a5384b

View file

@ -98,12 +98,12 @@ def create_file(location: Optional[str] = None):
return {"error": "file exists already"}, 409
file.save(sanitized_path)
fid = ctx.db.create_file(
row = ctx.db.create_file(
uid=ctx.uid, filename=file.filename, path=sanitized_path
)
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