mirror of https://github.com/jumpserver/jumpserver
fix: 获取ip函数返回None
parent
e5e3289dc1
commit
132954ca81
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue