Skip to content

Commit e84db0f

Browse files
committed
fix job_id return value
1 parent 296f9bc commit e84db0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

moonraker/components/history.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,13 @@ async def save_job(self, job: PrinterJob, job_id: Optional[str]) -> Optional[str
465465
"default"
466466
]
467467
if job_id is None:
468-
job_id = job_id
468+
job_id = str(uuid4())
469469
placeholders = ",".join("?" * len(values))
470470
async with self.history_table as tx:
471471
cursor = await tx.execute(
472472
f"REPLACE INTO {HIST_TABLE} VALUES({placeholders})", values
473473
)
474-
return cursor.lastrowid
474+
return job_id
475475

476476
async def delete_job(self, job_id: Union[int, str]) -> None:
477477
if isinstance(job_id, str):

0 commit comments

Comments
 (0)