Skip to content

fix: 修复多维表格筛选项 isEmpty/isNotEmpty 操作符无法使用的问题#202

Open
armylong wants to merge 1 commit into
larksuite:v3_mainfrom
armylong:fix/condition-value-omitempty
Open

fix: 修复多维表格筛选项 isEmpty/isNotEmpty 操作符无法使用的问题#202
armylong wants to merge 1 commit into
larksuite:v3_mainfrom
armylong:fix/condition-value-omitempty

Conversation

@armylong
Copy link
Copy Markdown

@armylong armylong commented Apr 5, 2026

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字段无意义.

Condition.Value 字段的 omitempty 标签导致空数组 [] 无法被序列化, 请求会报错 。
而飞书 API 要求 isEmpty/isNotEmpty 操作符必须传入空数组。
移除 omitempty 标签后可正常发送 value:[] 。
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 5, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants