]> acesimba.cloud Git - words.git/commit
fix: sync/push 422 — group_id 接受 int/str 并归一化
authorroot <root@localhost.localdomain>
Fri, 14 Aug 2026 13:59:19 +0000 (21:59 +0800)
committerroot <root@localhost.localdomain>
Fri, 14 Aug 2026 13:59:19 +0000 (21:59 +0800)
commita77a98c93e64f90189e3f1aacd202cd45cbd3389
tree06f160cf82ade21d7cf8118d58c997eab8b1ba20
parent426858a86bd98d197ea6d107c9e2f88b63f90011
fix: sync/push 422 — group_id 接受 int/str 并归一化

iPad 离线学习后恢复连线同步失败,根因为前端 IndexedDB 以 int
存储 group_id,而 Pydantic 模型声明为 str,导致 /api/sync/push
返回 422。将 ProgressUpdate/SyncEvent 的 group_id 改为
Union[str, int] 并加 field_validator 在校验前转 str,修复上传。
backend/main.py