mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-24 18:23:07 +08:00
chore: skip unnecessary key checks prior to accessing a dictionary (#4497)
This commit is contained in:
@@ -48,7 +48,7 @@ class WolframAlphaTool(BuiltinTool):
|
||||
|
||||
if 'success' not in response_data['queryresult'] or response_data['queryresult']['success'] != True:
|
||||
query_result = response_data.get('queryresult', {})
|
||||
if 'error' in query_result and query_result['error']:
|
||||
if query_result.get('error'):
|
||||
if 'msg' in query_result['error']:
|
||||
if query_result['error']['msg'] == 'Invalid appid':
|
||||
raise ToolProviderCredentialValidationError('Invalid appid')
|
||||
|
||||
Reference in New Issue
Block a user