fix: base user_exist完善
This commit is contained in:
parent
a534bde086
commit
d29fcce935
|
|
@ -322,7 +322,7 @@ def phone_exist(phone):
|
||||||
|
|
||||||
|
|
||||||
def user_exist(username):
|
def user_exist(username):
|
||||||
if User.objects.filter(username=username).exists():
|
if User.objects.get_queryset(all=True).filter(username=username).exists():
|
||||||
raise serializers.ValidationError(**USERNAME_EXIST)
|
raise serializers.ValidationError(**USERNAME_EXIST)
|
||||||
return username
|
return username
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue