Fix Pydantic v2 ORM Mode model_config Override Error
· 2 min read
TL;DR
Pydantic v2 no longer supports class Config. Use model_config = ConfigDict(from_attributes=True) instead. If your model has a field named model_config, you must rename it to avoid conflict with the reserved attribute.