修复scalar_one_or_none相关limit
This commit is contained in:
@@ -61,7 +61,7 @@ async def _reload_task(db, task_id: str) -> ChatGenerationTask | None:
|
||||
select(ChatGenerationTask).where(
|
||||
ChatGenerationTask.id == task_id,
|
||||
ChatGenerationTask.deleted_at.is_(None),
|
||||
)
|
||||
).limit(1)
|
||||
)
|
||||
return result.scalar_one_or_none()
|
||||
|
||||
@@ -72,7 +72,7 @@ async def _run(task_id: str):
|
||||
select(ChatGenerationTask).where(
|
||||
ChatGenerationTask.id == task_id,
|
||||
ChatGenerationTask.deleted_at.is_(None),
|
||||
)
|
||||
).limit(1)
|
||||
)
|
||||
task = result.scalar_one_or_none()
|
||||
if not task or task.generation_mode != "chatapi_async":
|
||||
|
||||
Reference in New Issue
Block a user