Jelajahi Sumber

Fixed a bug where it was impossible to create a superuser

TonyKurts 11 bulan lalu
induk
melakukan
baf0cff23d
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      models.py

+ 1 - 0
models.py

@@ -7,6 +7,7 @@ class ShariXUser(AbstractUser):
     avatar = models.ImageField(upload_to="useravatars/", null=True, blank=True, verbose_name="Аватар")
 
     USERNAME_FIELD = "phone_number"
+    REQUIRED_FIELDS = ['username']
 
     @property
     def full_name(self):