From 7679c9e5c516798e3a0f39d46f2409613019c115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Fri, 7 Apr 2023 23:21:48 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20exception=20thrown?= =?UTF-8?q?=20when=20performing=20operations=20on=20objects=20associated?= =?UTF-8?q?=20with=20the=20Session?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/services/users/services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/services/users/services.py b/core/services/users/services.py index f1c0284b..84461cd8 100644 --- a/core/services/users/services.py +++ b/core/services/users/services.py @@ -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)