fix: model validation
This commit is contained in:
parent
23329e7d36
commit
b90b70568c
@ -67,7 +67,6 @@ async def create_account(
|
|||||||
|
|
||||||
if user_validation is None:
|
if user_validation is None:
|
||||||
|
|
||||||
|
|
||||||
await create_user(connection,user,authorize_user.id)
|
await create_user(connection,user,authorize_user.id)
|
||||||
user_new = await get_user_login(connection, user.login)
|
user_new = await get_user_login(connection, user.login)
|
||||||
return user_new
|
return user_new
|
||||||
@ -104,7 +103,7 @@ async def update_account(
|
|||||||
if update_values is None:
|
if update_values is None:
|
||||||
return user
|
return user
|
||||||
|
|
||||||
user_update_data = User.model_validate(update_values)
|
user_update_data = User.model_validate({**user.model_dump(), **update_values})
|
||||||
|
|
||||||
await update_user_id(connection, update_values, user)
|
await update_user_id(connection, update_values, user)
|
||||||
|
|
||||||
|
@ -107,6 +107,8 @@ async def update_keyring(
|
|||||||
if update_values is None:
|
if update_values is None:
|
||||||
return keyring
|
return keyring
|
||||||
|
|
||||||
|
keyring_update_data = AccountKeyring.model_validate({**keyring.model_dump(), **update_values})
|
||||||
|
|
||||||
|
|
||||||
await update_key_id(connection, update_values, keyring)
|
await update_key_id(connection, update_values, keyring)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user