fastapi-react icon indicating copy to clipboard operation
fastapi-react copied to clipboard

incorrect type on get_user_by_email()

Open cardoe opened this issue 4 years ago • 0 comments

The current signature is def get_user_by_email(db: Session, email: str) -> schemas.UserBase: but I believe this to be incorrect. It should be def get_user_by_email(db: Session, email: str) -> schemas.User:. The reason is that this function returns the DB row which includes the id as part of the model.

cardoe avatar Feb 21 '21 02:02 cardoe