为User problems_status 添加默认值,并精简了相关代码
This commit is contained in:
@@ -31,8 +31,7 @@ class User(AbstractBaseUser):
|
||||
# 0代表不是管理员 1是普通管理员 2是超级管理员
|
||||
admin_type = models.IntegerField(default=0)
|
||||
# JSON字典用来表示该用户的问题的解决状态 1为ac,2为正在进行
|
||||
problems_status = models.TextField(blank=True)
|
||||
|
||||
problems_status = models.TextField(default="{}")
|
||||
|
||||
USERNAME_FIELD = 'username'
|
||||
REQUIRED_FIELDS = []
|
||||
|
||||
Reference in New Issue
Block a user