⬆ Upgrade code to support pydantic V2 (#615)

This commit is contained in:
Esteban Maya
2024-02-28 17:24:24 -05:00
committed by GitHub
parent 2346b81c51
commit 08395759fe
7 changed files with 47 additions and 40 deletions
+2 -4
View File
@@ -1,4 +1,4 @@
from pydantic import BaseModel
from pydantic import BaseModel, ConfigDict
# Shared properties
@@ -22,9 +22,7 @@ class ItemInDBBase(ItemBase):
id: int
title: str
owner_id: int
class Config:
orm_mode = True
model_config = ConfigDict(from_attributes=True)
# Properties to return to client