Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make changes necessary to deal with new term #985

Merged
merged 6 commits into from
Aug 9, 2024

Conversation

linusha
Copy link
Collaborator

@linusha linusha commented Jul 18, 2024

Contains all necessary changes for the recently started 10th term of parliament.
It will be necessary to run htv dev load-groups once more, when the official data sources are updated to reflect the newly formed groups. See #960.

@linusha linusha requested a review from tillprochaska July 18, 2024 15:06
@linusha linusha force-pushed the enhancement/term-10 branch 2 times, most recently from 7964292 to e14d5d6 Compare July 18, 2024 16:18
linusha and others added 4 commits August 2, 2024 22:11
The official data source of which we retrieve the data about political groups has not been updated yet. After the update, it will be necessary to run `htv dev load_groups` again. Until then, we manually inserted the newly formed groups.
Somehow, the `ids` list contained vote ids as strings. As the vote.id is an int, the sort lambda would fail resulting in 500 errors upon /votes/search. This fixes the problem, although the cause is not addressed yet.
@linusha linusha force-pushed the enhancement/term-10 branch from e14d5d6 to 932e454 Compare August 2, 2024 20:11
backend/howtheyvote/analysis/votes.py Outdated Show resolved Hide resolved
backend/howtheyvote/api/query.py Show resolved Hide resolved
backend/howtheyvote/api/query.py Outdated Show resolved Hide resolved
This resolves two issues:

1) The subcondition `date >= brexit_date and count != 705` would have been true for every vote of the 10th term. (This is related to the changes in 731663.)

2) If a vote had multiple issues, only one of them would be persisted, because multiple fragments with the same primary key would have been emitted. (I believe this was a bug since the inception of this code.)
@linusha linusha requested a review from tillprochaska August 9, 2024 17:07
@tillprochaska tillprochaska merged commit 2e6a84f into main Aug 9, 2024
2 checks passed
@tillprochaska tillprochaska deleted the enhancement/term-10 branch August 9, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants