Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Physton committed Jul 15, 2023
1 parent 845e38c commit a46e7f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/physton_prompt/get_translate_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def privacy_translate_api_config(data_key, data):
if not find:
return data
api_item = find
if 'config' not in api_item or not api_item['config']:
return data

for config in api_item['config']:
# 如果有 privacy 的属性并且为 True
if 'privacy' in config and config['privacy'] and config['type'] == 'input':
Expand Down Expand Up @@ -96,6 +99,8 @@ def unprotected_translate_api_config(data_key, data):
if not find:
return data
api_item = find
if 'config' not in api_item or not api_item['config']:
return data

storage_data = st.get(data_key)

Expand Down

0 comments on commit a46e7f2

Please sign in to comment.