✏️ Fix: [#50] user model 유저 생성에 비번 없을 경우(소셜) 로직 추가
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user