瀏覽代碼

Fixed a bug where it was impossible to create a superuser

TonyKurts 11 月之前
父節點
當前提交
baf0cff23d
共有 1 個文件被更改,包括 1 次插入0 次删除
  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):