Prevent task session delivery NOT NULL crashes
* fix: coerce null endpoint_url when delivering task result to a session * fix: also coerce null model so the session insert satisfies NOT NULL * test: cover task session delivery on an empty database
This commit is contained in:
@@ -1300,8 +1300,8 @@ class TaskScheduler:
|
||||
sess = DbSession(
|
||||
id=session_id,
|
||||
name=f"[Task] {task.name}",
|
||||
endpoint_url=endpoint_url,
|
||||
model=model_name,
|
||||
endpoint_url=endpoint_url or "",
|
||||
model=model_name or "",
|
||||
owner=task.owner,
|
||||
created_at=datetime.utcnow(),
|
||||
updated_at=datetime.utcnow(),
|
||||
|
||||
Reference in New Issue
Block a user