Skip to content

Commit

Permalink
Merge: 소셜 로그인 시 user create 부분 수정
Browse files Browse the repository at this point in the history
[inspection] 소셜 로그인 시 user create 부분 수정
  • Loading branch information
yyysolhhh authored May 30, 2024
2 parents 5474c2f + 588a039 commit 3791a85
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,9 @@ def create_user(
image_response = urlopen(profile_img_url)
image_content = image_response.read()
profile_image = ContentFile(image_content, name=f"{provider_info['name']}-profile-{uuid4_generator(8)}.jpg")
user = Account.objects.create(email=email, nickname=nickname, profile_img=profile_image)
else:
profile_image = None
user = Account.objects.create(email=email, nickname=nickname, profile_img=profile_image)
user.set_unusable_password()
user = Account.objects.create(email=email, nickname=nickname)
user.save()
return user

Expand Down

0 comments on commit 3791a85

Please sign in to comment.