chore: skip unnecessary key checks prior to accessing a dictionary (#4497)

This commit is contained in:
Bowen Liang
2024-05-19 18:30:45 +08:00
committed by GitHub
parent aa13d14019
commit 04ad46dd31
30 changed files with 45 additions and 44 deletions

View File

@@ -49,7 +49,7 @@ class WorkflowAppGenerator(BaseAppGenerator):
inputs = args['inputs']
# parse files
files = args['files'] if 'files' in args and args['files'] else []
files = args['files'] if args.get('files') else []
message_file_parser = MessageFileParser(tenant_id=app_model.tenant_id, app_id=app_model.id)
file_extra_config = FileUploadConfigManager.convert(workflow.features_dict, is_vision=False)
if file_extra_config: