Files
DeepTutor/deeptutor/api
Zhuoran Wang 3ce3d47858 Fix quiz-attempt 500 when the Book entity has no chat_session_id (#2692)
* Fix quiz-attempt 500 when the Book entity has no chat_session_id

book.py's attempt sync read book.chat_session_id, an attribute that only
exists on CreateBookRequest/BookInputs (a legacy creation-time shorthand)
and is not persisted on the Book model — so every quiz attempt without a
page-bound chat session raised AttributeError after the progress was
saved, returning 500 and dropping the Focus-Check assessment sync.

Read only the persisted per-page mapping, and cover it with a regression
test whose fake mirrors the real entity (no chat_session_id attribute).

* style: apply ruff format

* chore(api): refresh router index for the book router

---------

Co-authored-by: zszz3 <91608029+zszz3@users.noreply.github.com>
2026-11-29 15:28:55 +08:00
..
fix
2026-10-28 12:28:20 +08:00