Багфикс
This commit is contained in:
parent
ac76cf9c9e
commit
528252897d
1 changed files with 5 additions and 2 deletions
|
@ -74,8 +74,11 @@ class UserDAO(BaseDAO):
|
|||
return SUsers.model_validate(result)
|
||||
|
||||
async def change_data(self, user_id: int, **data_to_change) -> None:
|
||||
stmt = update(Users).where(Users.id == user_id).values(**data_to_change)
|
||||
await self.session.execute(stmt)
|
||||
try:
|
||||
stmt = update(Users).where(Users.id == user_id).values(**data_to_change)
|
||||
await self.session.execute(stmt)
|
||||
except IntegrityError:
|
||||
raise UserAlreadyExistsException
|
||||
|
||||
async def get_user_allowed_chats(self, user_id: int) -> SAllowedChats:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue