diff --git a/back/utils.py b/back/utils.py index f9b13a5..0f28c18 100644 --- a/back/utils.py +++ b/back/utils.py @@ -42,10 +42,10 @@ def get_password_hash(password): # проблема здесь -def get_user(db: SessionLocal, email: str): +def get_user(db: SessionLocal, email: str, response_model=User): user_with_required_email = db.query(UserDatabase).filter(UserDatabase.email == email).one() if user_with_required_email: - return user_with_required_email + return UserInDB(user_with_required_email) return None