fix: base user_exist完善
This commit is contained in:
parent
f9584f6a00
commit
805fc59100
|
|
@ -320,7 +320,7 @@ def phone_exist(phone):
|
|||
|
||||
|
||||
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)
|
||||
return username
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue