fix: 组件启动失败

pull/12010/head
wangruidong 2023-10-31 19:10:18 +08:00 committed by 老广
parent 204258f058
commit 4021b1955e
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ def get_request_ip(request):
def get_request_ip_or_data(request):
ip = ''
if hasattr(request, 'data') and request.data.get('remote_addr', ''):
if hasattr(request, 'data') and isinstance(request.data, dict) and request.data.get('remote_addr', ''):
permission = ServiceAccountSignaturePermission()
if permission.has_permission(request, None):
ip = request.data.get('remote_addr', '')