DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
fix: check was_running before deleted to return 409 instead of 404
WeDone1c8860291d3e
diff --git a/deeptutor/api/routers/sessions.py b/deeptutor/api/routers/sessions.pyindex 9cd80981a..db4853916 100644--- a/deeptutor/api/routers/sessions.py+++ b/deeptutor/api/routers/sessions.py@@ -118,10 +118,10 @@ async def delete_session(session_id: str):async def delete_turn_by_message(session_id: str, message_id: int):store = get_sqlite_session_store()result = await store.delete_turn_by_message(session_id, message_id)- if not result["deleted"]:- raise HTTPException(status_code=404, detail="Message not found")if result["was_running"]:raise HTTPException(status_code=409, detail="Cannot delete a message while its turn is running")+ if not result["deleted"]:+ raise HTTPException(status_code=404, detail="Message not found")attachment_store = get_attachment_store()for aid in result["attachment_ids"]:try: