fix: 获取ip函数返回None

pull/12647/head
wangruidong 2023-10-26 16:37:15 +08:00 committed by Bryan
parent e5e3289dc1
commit 132954ca81
1 changed files with 1 additions and 1 deletions

View File

@ -95,9 +95,9 @@ class CommonMixin:
_ip = '' _ip = ''
def get_request_ip(self): def get_request_ip(self):
ip = ''
if not self._ip: if not self._ip:
self._ip = get_request_ip_or_data(self.request) self._ip = get_request_ip_or_data(self.request)
return self._ip
def raise_credential_error(self, error): def raise_credential_error(self, error):
raise self.partial_credential_error(error=error) raise self.partial_credential_error(error=error)