This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix models to support pydantic orm_mode
See GitHub PR fastapi#43 fastapi#43 See GitHub issue fastapi#72 fastapi#72 When viewing the user profile, name and email weren't showing up. Docker Compose logs showed a pydantic error: https://pydantic-docs.helpmanual.io/ ``` backend_1 | pydantic.error_wrappers.ValidationError: 1 validation error for User backend_1 | response -> 0 backend_1 | value is not a valid dict (type=type_error.dict) ``` Pydantic orm_mode is needed. This commit will update the database models to use pydantic orm_mode, with cleaner syntax than the fix suggested in issue fastapi#72 (by adding class Config directly to the base class).
- Loading branch information