Files
DeepTutor/deeptutor/api/routers
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
..
2026-09-24 09:59:56 +08:00
2026-09-02 04:09:11 +08:00
2026-09-21 02:30:40 +08:00
2026-09-22 21:36:27 +08:00
2026-09-21 02:30:40 +08:00
2026-09-06 13:46:29 +08:00
2026-10-04 21:35:00 +08:00