Add EP amendment and part votes, hidden from general lists by default

They come from the same responses as final votes. A sitting has over a
hundred, so they are flagged part_vote and only appear on request: the vote
lists have an option for them, feeds, counts and search chunks leave them out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
simonandClaude Opus 5.5 committed 2026-11-09 13:17:10 +01:00
1 parent bf19e503f9
commit b06f17e587
20 files changed
+176 -47

No files matched your search

+7 -4
View File
@@ -133,8 +133,10 @@ def get_person(slug: str, conn: DB):
@app.get("/api/v1/persons/{slug}/votes", response_model=list[s.PersonVote])
def get_person_votes(slug: str, conn: DB, topics: str | None = None, limit: Limit = 100, offset: Offset = 0):
return queries.person_votes(conn, slug, topics=csv_list(topics), limit=limit, offset=offset)
def get_person_votes(slug: str, conn: DB, topics: str | None = None, include_parts: bool = False, limit: Limit = 100,
offset: Offset = 0):
return queries.person_votes(conn, slug, topics=csv_list(topics), include_parts=include_parts, limit=limit,
offset=offset)
@app.get("/api/v1/persons/{slug}/network", response_model=s.Network)
@@ -218,9 +220,10 @@ def get_wiki_edits(conn: DB, limit: Limit = 100, offset: Offset = 0):
@app.get("/api/v1/votes", response_model=list[s.VoteItem])
def get_votes(conn: DB, party: str | None = None, topics: str | None = None, roll_call: bool | None = None,
since: date | None = None, until: date | None = None, limit: Limit = 50, offset: Offset = 0):
since: date | None = None, until: date | None = None, include_parts: bool = False, limit: Limit = 50,
offset: Offset = 0):
return queries.list_votes(conn, party=party, topics=csv_list(topics), roll_call=roll_call, since=since,
until=until, limit=limit, offset=offset)
until=until, include_parts=include_parts, limit=limit, offset=offset)
@app.get("/api/v1/votes/{vote_id}", response_model=s.VoteDetail)