用户名不区分大小写;
修复更新problem时的一些问题
This commit is contained in:
@@ -20,7 +20,7 @@ class UserManager(models.Manager):
|
||||
use_in_migrations = True
|
||||
|
||||
def get_by_natural_key(self, username):
|
||||
return self.get(**{self.model.USERNAME_FIELD: username})
|
||||
return self.get(**{f"{self.model.USERNAME_FIELD}__iexact": username})
|
||||
|
||||
|
||||
class User(AbstractBaseUser):
|
||||
|
||||
Reference in New Issue
Block a user