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 b113581203
commit 9ef662705d

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