From 94774a6187fc7ecafb1383de1c6586a2ed917654 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 26 Aug 2024 15:07:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20base=20auth=20authenticate=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E4=B8=8D=E5=BF=85=E9=A1=BB=E7=9A=84employee?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/auth1/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/auth1/authentication.py b/apps/auth1/authentication.py index 2767ae2c..9aeffda0 100755 --- a/apps/auth1/authentication.py +++ b/apps/auth1/authentication.py @@ -13,7 +13,7 @@ class CustomBackend(ModelBackend): return try: user = UserModel._default_manager.get( - Q(username=username) | Q(phone=username) | Q(employee__id_number=username)) + Q(username=username) | Q(phone=username)) except UserModel.DoesNotExist: # Run the default password hasher once to reduce the timing # difference between an existing and a nonexistent user (#20760).