补全account测试

This commit is contained in:
zema1
2017-11-23 21:12:37 +08:00
parent 45953b8f80
commit a87d73393d
6 changed files with 162 additions and 40 deletions

View File

@@ -197,7 +197,7 @@ class UsernameOrEmailCheck(APIView):
"email": False
}
if data.get("username"):
result["username"] = User.objects.filter(username=data["username"]).exists()
result["username"] = User.objects.filter(username=data["username"].lower()).exists()
if data.get("email"):
result["email"] = User.objects.filter(email=data["email"].lower()).exists()
return self.success(result)