mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-11-30 13:20:40 +03:00
migrate to pydantic 2
This commit is contained in:
@@ -54,5 +54,5 @@ async def update_stuff(
|
||||
db_session: AsyncSession = Depends(get_db),
|
||||
):
|
||||
stuff = await Stuff.find(db_session, name)
|
||||
await stuff.update(db_session, **payload.dict())
|
||||
await stuff.update(db_session, **payload.model_dump())
|
||||
return stuff
|
||||
|
||||
Reference in New Issue
Block a user