From aafc3b1ba476c6950bbacc0f0730ff50ff39a8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Tue, 18 Oct 2022 11:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E5=AE=A2=E8=B4=A6=E6=88=B7=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E6=97=B6=E5=85=B3=E8=81=94=E5=B7=B2=E6=9C=89=E4=BA=BA?= =?UTF-8?q?=E5=91=98bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/vm/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/vm/views.py b/apps/vm/views.py index 3f0b4d85..c2440ae4 100644 --- a/apps/vm/views.py +++ b/apps/vm/views.py @@ -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('该手机号已注册,请直接登录') # 访客/司机账户创建