Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Let a saved reform or household point at a new v2 policy or household without changing its ID

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

维护者通常 3 天内回复

@anth-volk 已经在做这个了。

开始于 2026年10月21日。

  • #4005 来自 @anth-volk —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
api

调研方向

Start by reading the PATCH handlers for /v2/user-policies/{id} and /v2/user-households/{id}, then follow how the existing v1 reference fields validate ownership and country. Add support for the requested v2 IDs while preserving the saved item's ID, name and creation time. Done when both endpoints accept an existing policy or household in the saved item's country and reject records that fail those checks.

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

描述

What

PATCH /v2/user-policies/{id} should accept policy_id, and PATCH /v2/user-households/{id} should accept household_id. Each must check that the caller owns the saved item and that the new policy or household exists in the saved item's country. The saved item keeps its ID, name and creation time.

Why

Policies and households in v2 are immutable: editing a reform or a household creates a new row. Today a saved reform or household can be pointed at another record only through its v1 reference (legacy_policy_id or legacy_household_id), so once the app saves on v2, editing a saved item would mean deleting it and saving a new one with a new ID. Reports link to saved reforms by that ID, so it has to stay the same.

The app does not call these fields yet; it will once it moves to the v2 routes.

主要语言
Python
星标
18
派生
33
平均合并
2 天 18 小时
30 天内合并 PR
36

环境准备

从这里开始

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

PolicyEngine/policyengine-api 的其他 Issue

查看 PolicyEngine/policyengine-api 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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