From e5bdcea8877b04552741720148842d3837bedbe0 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Mon, 12 May 2025 11:54:54 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix:=20[#50]=20user=20mode?= =?UTF-8?q?l=20=EC=9C=A0=EC=A0=80=20=EC=83=9D=EC=84=B1=EC=97=90=20?= =?UTF-8?q?=EB=B9=84=EB=B2=88=20=EC=97=86=EC=9D=84=20=EA=B2=BD=EC=9A=B0(?= =?UTF-8?q?=EC=86=8C=EC=85=9C)=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/users/models.py b/users/models.py index 9f62dcd..ed643fd 100644 --- a/users/models.py +++ b/users/models.py @@ -11,7 +11,10 @@ from common.models.choiceModels import NotificationType class UserManager(BaseUserManager): def create_user(self, email, password, **kwargs): user = self.model(email = email, **kwargs) - user.set_password(password) + if not password: + user.set_unusable_password() + else: + user.set_password(password) user.save(using=self._db) return user