open-notebook/api
james LI 133709879b
fix: use model_dump(exclude_unset=True) in PUT profile handlers (#860)
PUT /api/episode-profiles/{id} and PUT /api/speaker-profiles/{id}
both blindly assigned every field of the request body model (including
Optional fields with None defaults) onto the DB object. SurrealDB
rejected None values for fields typed as string — causing HTTP 500
whenever the client omitted any optional field.

Replace the per-field assignment blocks with a model_dump(exclude_unset=True)
loop so only fields the client actually included are written through.
Fields absent from the request body retain their current DB values.

Closes #809

Co-authored-by: james <li@jamesdeMacBook-Pro.local>
2026-06-13 08:56:33 -03:00
..
routers fix: use model_dump(exclude_unset=True) in PUT profile handlers (#860) 2026-06-13 08:56:33 -03:00
__init__.py Api podcast migration (#93) 2025-07-17 08:36:11 -03:00
auth.py feat: credential-based API key management (#477) (#540) 2026-02-10 08:30:22 -03:00
chat_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
CLAUDE.md feat(podcasts): model registry integration, credential passthrough & new features (#632) 2026-02-27 11:06:47 -03:00
client.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
command_service.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
context_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
credentials_service.py fix(providers): expose OpenRouter embedding modality (#842) 2026-06-02 21:38:05 -03:00
embedding_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
episode_profiles_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
insights_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
main.py feat(api): add configurable CORS origins via CORS_ORIGINS (#767) 2026-04-19 16:22:10 -03:00
models.py feat: bump esperanto to 2.22.0 + Ollama num_ctx override (#833) 2026-06-02 06:20:24 -03:00
models_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
notebook_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
notes_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
podcast_api_service.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
podcast_service.py refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
search_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
settings_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
sources_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
transformations_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00