Adds a committee endpoint in order to get information about a specific committee.
https://github.com/caciviclab/disclosure-backend-static/pull/16
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.![]()
@tdooner approved this pull request.
Cool, looks good other than that one weird thing which might actually work because of Ruby :magic:
In calculators/referendum_supporters_calculator.rb:
> @ballot_measures = ballot_measures
+ @committees_by_filer_id = committees
+ committees.where('"Filer_ID" IS NOT NULL').index_by { |c| c.Filer_ID }
This looks wrong to me, I don't think the WHERE will be applied to the original query.
You should remove the committees on line 5
@adborden commented on this pull request.
In calculators/referendum_supporters_calculator.rb:
> @ballot_measures = ballot_measures
+ @committees_by_filer_id = committees
+ committees.where('"Filer_ID" IS NOT NULL').index_by { |c| c.Filer_ID }
Oh yeah, thanks. Totally a typo.
@adborden pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or mute the thread.![]()
So fixing that caused other problems, so it obviously wasn't working. Do I have this right? The committee files schedule E for their expenditures, that actually makes them the "payer" not the "payee", right?
@adborden pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
View it on GitHub or mute the thread.![]()
Decided to dig into why we still had no IDs for some of the Oakland committees so turned up another fix. Looks like we were able to match a committee to all of the referendum expenditures in oakland 🏆
$ grep -r "id.*null" build/referendum/ | wc -l
0
Merged #16.
Ah yeah, this looks right. Filer_ID should always be a string. Thanks for digging in to find the bug. Next time, you should run make process and include the changes in build to the PR (in a separate commit from the rest of your code changes). 👍