优先级/严重性:
中到高
平台:
Python 脚本以及 cURL 命令行
Discourse 服务器版本:
3.6.0.beta3-latest (6adb4f8e84)
描述:
当尝试更新现有组的 watching_category_ids 时,我的 Python 脚本(使用简单的 “requests.put”)报告以下错误:
_doPut> 请求出错: 422 Unprocessable Entity {'user_count': 2, 'errors': ['您提供的请求参数无效: update_existing_users']}
即使我的 JSON 数据中没有名为 update_existing_users 的参数。
使用 cURL 进行检查:
curl -k -L -X PUT -H 'api-key:xyz’ \
-H 'api-username:system' \
-H 'Accept:application/json;charset=utf-8' \
-H 'Content-Type:application/json' \
--data '{"group":{"name":"eb-chair-exo","watching_category_ids":[336,337]}}' \
https://cms-phys-talk.web.cern.ch/groups/46.json
我得到了相同的错误:
{“user_count”:2,“errors”:[“您提供的请求参数无效: update_existing_users”]}%
可重现步骤:
curl -k -L -X PUT -H 'api-key:xyz’ \
-H 'api-username:system' \
-H 'Accept:application/json;charset=utf-8' \
-H 'Content-Type:application/json' \
--data '{"group":{"name":"eb-chair-exo","watching_category_ids":[336,337]}}' \
https://cms-phys-talk.web.cern.ch/groups/46.json
编辑:已添加 Discourse 服务器版本