From 51d41c75bc235c6d6d240ad65712109d035e58e3 Mon Sep 17 00:00:00 2001 From: fnzksxl Date: Sat, 21 Sep 2024 07:13:25 +0900 Subject: [PATCH] =?UTF-8?q?#94=20Fix:=20=EB=B9=84=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=ED=9A=8C=EC=9B=90=EC=9D=98=20GetUser=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=20=EC=8B=9C=20=EB=B0=98=ED=99=98=EA=B0=92=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wtnt/user/auth/service.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wtnt/user/auth/service.py b/wtnt/user/auth/service.py index 4585e97..20c15c7 100644 --- a/wtnt/user/auth/service.py +++ b/wtnt/user/auth/service.py @@ -16,8 +16,11 @@ class AuthService(BaseService): def get_user(self): user_id = self.request.user.id - user = User.objects.get(pk=user_id) - serializer = UserSerializer(user) + try: + user = User.objects.get(pk=user_id) + serializer = UserSerializer(user) + except User.DoesNotExist: + raise None return serializer.data