From 6127dd8ba4265eeda048fbee31c661557126c098 Mon Sep 17 00:00:00 2001 From: DmitryGantimurov Date: Wed, 19 Jul 2023 00:10:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=20res?= =?UTF-8?q?ponse=5Fmodel=20=D0=BA=20get=5Fuser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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