From 9ef662705d9d542b4528f1c0421802534bc70444 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Mon, 5 Jun 2023 01:07:47 -0600 Subject: [PATCH] fix: need to get row id to start jobs automatically --- projects/tentacles/src/python/tentacles/blueprints/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/tentacles/src/python/tentacles/blueprints/api.py b/projects/tentacles/src/python/tentacles/blueprints/api.py index 8a89935..93c7055 100644 --- a/projects/tentacles/src/python/tentacles/blueprints/api.py +++ b/projects/tentacles/src/python/tentacles/blueprints/api.py @@ -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