🐛 Fix the exception thrown when performing operations on objects associated with the Session

This commit is contained in:
洛水居室 2023-04-07 23:21:48 +08:00
parent 7c3d198c7f
commit 7679c9e5c5
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -70,7 +70,7 @@ class UserAdminService(BaseService):
else:
user = User(user_id=user_id, permissions=PermissionsEnum.ADMIN)
await self.user_repository.add(user)
return await self._cache.set(user.user_id)
return await self._cache.set(user_id)
async def delete_admin(self, user_id: int) -> bool:
user = await self.user_repository.get_by_user_id(user_id)