influxdata / influxdata/iot-api-python

The argument `authorization` in `create_authorization` needs to use a keyword

未关闭
#12 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
28
派生
10
PR 合并指标
30 天内没有已合并 PR

描述

In api/devices.py#162 the statement...

request = authorization_api.create_authorization(authorization)

should be

request = authorization_api.create_authorization(authorization=authorization)

This is related to.

Note that on clicking the Auth link in the flask UI, the tutorial application is now returning...

ApiException
influxdb_client.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.11', 'X-Platform-Error-Code': 'invalid', 'Date': 'Wed, 04 Dec 2024 13:04:14 GMT', 'Content-Length': '163'})
HTTP response body: {
	"code": "invalid",
	"message": "invalid json structure: json: cannot unmarshal object into Go struct field postAuthorizationRequest.orgID of type platform.ID"
}

The example here is causing confusion for some users.

I tried to push a branch with this change to create a PR, however I do not have write permissions to this repository.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 api/devices.py#162 开始,检查 Flask 教程流程中的 create_authorization 调用。更新参数用法,使其符合 issue 要求的关键字形式,然后测试 Auth 链接并确认它不再返回所报告的 400 ApiException。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api, backend
Issue 类型
缺陷
难度
1/5
预计耗时
1 小时以内
活跃度
停滞
描述清晰度
描述清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。