✏️ Fix: [#50] user model 유저 생성에 비번 없을 경우(소셜) 로직 추가

This commit is contained in:
sm4640
2025-05-12 11:54:54 +09:00
parent ca920077f4
commit e5bdcea887

View File

@@ -11,6 +11,9 @@ from common.models.choiceModels import NotificationType
class UserManager(BaseUserManager):
def create_user(self, email, password, **kwargs):
user = self.model(email = email, **kwargs)
if not password:
user.set_unusable_password()
else:
user.set_password(password)
user.save(using=self._db)
return user