From baf9360c01d9cbc829cc65d1142d2a450a4b448a Mon Sep 17 00:00:00 2001 From: iSecloud <869820505@qq.com> Date: Thu, 5 Sep 2024 16:59:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E4=BF=AE=E5=A4=8Duser=5Fmaker?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E7=94=A8=E9=A1=BA=E5=BA=8F=20#6691?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/bk_web/middleware.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbm-ui/backend/bk_web/middleware.py b/dbm-ui/backend/bk_web/middleware.py index 309980b310..c988d045b7 100644 --- a/dbm-ui/backend/bk_web/middleware.py +++ b/dbm-ui/backend/bk_web/middleware.py @@ -245,9 +245,10 @@ class JWTUserModelBackend(UserModelBackend): def __init__(self): super().__init__() + self.user_maker = self.jwt_user_maker @staticmethod - def user_maker(username): + def jwt_user_maker(username): user_model = get_user_model() if hasattr(user_model.objects, "get_by_natural_key"): _user_maker = user_model.objects.get_by_natural_key # type: ignore