fix UserManager
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Jakub K 2023-12-22 18:59:26 +01:00
parent a6e24a49be
commit 5f234a54f1

View File

@ -17,7 +17,7 @@ class MyUserManager(BaseUserManager):
def create_superuser(self, email, password=None, **extra_fields):
extra_fields.setdefault('is_staff', True)
extra_fields.setdefault('is_superuser', True)
email = self.normalize_email(email)
if extra_fields.get('is_staff') is not True:
raise ValueError(_('Superuser must have is_staff=True.'))
if extra_fields.get('is_superuser') is not True: