From 132954ca818c7950764c950cb5f7522345affa51 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 26 Oct 2023 16:37:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=8E=B7=E5=8F=96ip=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E8=BF=94=E5=9B=9ENone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/mixins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/authentication/mixins.py b/apps/authentication/mixins.py index bbc2203ed..d92729a40 100644 --- a/apps/authentication/mixins.py +++ b/apps/authentication/mixins.py @@ -95,9 +95,9 @@ class CommonMixin: _ip = '' def get_request_ip(self): - ip = '' if not self._ip: self._ip = get_request_ip_or_data(self.request) + return self._ip def raise_credential_error(self, error): raise self.partial_credential_error(error=error)