fix: replace model_validate(..., update=) with .model_copy(update=)
Pydantic v2 model_validate() does not accept an update kwarg; the correct
pattern is model_validate(obj).model_copy(update={...}).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -187,7 +187,7 @@ async def scan_band_folder(
|
||||
)
|
||||
|
||||
imported += 1
|
||||
read = SongRead.model_validate(song, update={"version_count": 1, "session_id": rehearsal_session_id})
|
||||
read = SongRead.model_validate(song).model_copy(update={"version_count": 1, "session_id": rehearsal_session_id})
|
||||
yield {"type": "song", "song": read.model_dump(mode="json"), "is_new": is_new}
|
||||
|
||||
yield {
|
||||
|
||||
Reference in New Issue
Block a user