fix: 修复多维表格筛选项 isEmpty/isNotEmpty 操作符无法使用的问题#202
Open
armylong wants to merge 1 commit into
Open
Conversation
Condition.Value 字段的 omitempty 标签导致空数组 [] 无法被序列化, 请求会报错 。 而飞书 API 要求 isEmpty/isNotEmpty 操作符必须传入空数组。 移除 omitempty 标签后可正常发送 value:[] 。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Filter.Conditions[].Value 字段的 omitempty 标签导致空数组 [] 无法被序列化, 请求会报错 。
而飞书 API 要求 isEmpty/isNotEmpty 操作符必须传入空数组 。
报错信息:
{
"code": 9499,
"error": {
"log_id": "20260405160759DA6D748745293DC6BDD7",
"troubleshooter": "排查建议查看(Troubleshooting suggestions): https://open.feishu.cn/search?from=openapi&log_id=20260405160759DA6D748745293DC6BDD7&code=9499&method_id=7301628054955556866"
},
"msg": "Missing required parameter: Value. Missing required parameter path: filter.conditions[1].value, Please check and modify accordingly."
}
结论:
移除 omitempty 标签后可正常发送 value:[] , 能正常使用 isEmpty/isNotEmpty筛选项.
优化建议:
如果operator是 isEmpty/isNotEmpty时, 后续底层可以直接去掉value字段的校验, 因为此时value字段无意义.