Skip to content

Commit

Permalink
#94 Fix: 비로그인 회원의 GetUser 사용 시 반환값 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
fnzksxl committed Sep 20, 2024
1 parent 67220b5 commit 51d41c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wtnt/user/auth/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 51d41c7

Please sign in to comment.