访客账户注册时关联已有人员bug

This commit is contained in:
曹前明 2022-10-18 11:06:29 +08:00
parent fad13077f6
commit aafc3b1ba4
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ class VisitorViewSet(CustomModelViewSet):
check_phone_code(phone, code)
# 查询是否已注册
user = User.objects.filter(phone=phone).first()
ep = Employee.objects.get_queryset(all=True).filter(phone=phone, user=None).first()
ep = Employee.objects.get_queryset(all=True).filter(phone=phone, user__isnull=True).first()
if user or ep:
raise ParseError('该手机号已注册,请直接登录')
# 访客/司机账户创建