fix:modify the default value of the extra field #1376
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
改配置为{}更合理,防止前端缺失传递参数时,造成后续的json解析错误
我们实际遇到了数据库中t_gpts_tools_type表extra字段存储''的情况,导致工作流无法正常运行,目前排查到因添加api工具时产生的错误,更新时毕昇代码中有一段如下逻辑:
导致该字段值变为
{"api_location": null, "parameter_name": null}
,更新后api正常使用,工作流也变为正常实际上这个字段既然存储json配置,我认为默认为{}更合理,可以避免参数缺失时的错误