Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#4,004 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@anth-volk ci sta già lavorando.

Dal 21/10/2026.

  • #4005 di @anth-volk — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
18
Fork
33
Merge medio
2g 15h
PR unite (30g)
35

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-api

Tutte le issue di PolicyEngine/policyengine-api

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.