Run links keep only the last value of repeated query parameters
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 Run 视图的初始值准备开始。issue 指出 request.GET.dict() 会丢弃重复参数,请将其与使用 normalize_querydict() 的 NetBox 内置 Script 视图进行比较。检查 Run 表单如何处理 MultiObjectVar 和 MultiChoiceVar 的值。完成标准是重复查询参数的两个值都被选中;请确认两种字段类型都满足这一点。
由索引模型根据 Issue 内容生成。
描述
Plugin Version
v0.0.1
NetBox Version
v4.7.4
Python Version
3.12
Steps to Reproduce
- Upload and activate the following Script:
from dcim.models import Interface from netbox_scripts import MultiObjectVar, Script class PickInterfaces(Script): interfaces = MultiObjectVar(model=Interface) def run(self, data, commit): for interface in data['interfaces']: self.log_info(str(interface), obj=interface) - Use two existing interfaces, or create two on a device, and note their IDs.
- As a user who can run the Script and view both interfaces, open its Run URL with the
interfacesparameter repeated. Replace the sample IDs with the actual interface IDs:/plugins/netbox-scripts/scripts/<id>/run/?interfaces=1&interfaces=2
Expected Behavior
Both interfaces are selected in the form, matching NetBox's built-in Script form.
Observed Behavior
Only interface 2 is selected.
The Run view prepares initial values with request.GET.dict(), which discards earlier values for the same parameter. This also affects MultiChoiceVar fields. NetBox's built-in Script view preserves repeated values with normalize_querydict().
- 主要语言
- Python
- 星标
- 8
- 派生
- 0
- 平均合并
- 11 小时 23 分钟
- 30 天内合并 PR
- 24
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
netbox-community/netbox-scripts 的其他 Issue
-
app: scripts severity: low status: backlog type: bug
难度 2/5 1-3 小时 新手友好度 85/100
netbox-community/netbox-scripts#94 ·
维护者通常 1 天内回复
-
app: scripts status: backlog type: documentation
难度 2/5 1-3 小时 新手友好度 85/100
netbox-community/netbox-scripts#80 ·
维护者通常 1 天内回复
-
app: scripts severity: medium status: backlog type: bug
难度 1/5 1 小时以内 新手友好度 88/100
netbox-community/netbox-scripts#79 ·
维护者通常 1 天内回复
-
app: scripts severity: medium status: backlog type: bug
难度 2/5 1-3 小时 新手友好度 72/100
netbox-community/netbox-scripts#77 ·
维护者通常 1 天内回复
-
app: scripts severity: low status: backlog type: bug
难度 2/5 1-3 小时 新手友好度 68/100
netbox-community/netbox-scripts#76 ·
维护者通常 1 天内回复
查看 netbox-community/netbox-scripts 的全部 Issue
相似的 Issue
-
good first issue test
难度 2/5 1-3 小时 新手友好度 85/100
ANCORATE/EncryptHome#8 ·
-
PluginProvider.storeInstance races and clobbers the dedup cache for concurrent loads可能已有人在做 @Wilson0511 今天认领。 未关闭needs-triage
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 2 天内回复
-
Bug: failed Together chat calls do not record operation duration or error.type可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
community documentation good first issue
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100