mirror of
https://github.com/danagble/backend.git
synced 2026-11-16 03:00:21 +00:00
fix: flush upload job before child items
This commit is contained in:
parent
5a546e4e40
commit
cc9129e7dd
1 changed files with 1 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ async def create_job(project_id: str, kind: str, files: list[dict], db: AsyncSes
|
|||
job = UploadJob(id=uuid.uuid4().hex[:12], project_id=project_id,
|
||||
kind=kind or "images", total_files=len(files))
|
||||
db.add(job)
|
||||
await db.flush()
|
||||
items = []
|
||||
for f in files:
|
||||
item_id = uuid.uuid4().hex[:12]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue