caciviclab / disclosure-backend-static

Campaign finance data powering Open Disclosure California
https://caciviclab.org/odca-jekyll/
15 stars 14 forks source link

Output contribution list for Candidates without committee rows #265

Closed tdooner closed 4 years ago

tdooner commented 4 years ago

For candidates without entries in the committees spreadsheet tab, we still want to output their contribution list. The problem is, we store their contribution list on the Candidate instead of their associated committee. We also muddy the waters by saving a calculation called total_contributions which is calculated differently between Candidates and Committees.

This commit:

tdooner commented 4 years ago

@mikeubell I'm just going to merge this - it looked pretty good locally. We can check out the results when the build runs today.

mikeubell commented 4 years ago

This fails to calculate total_small_contributions for a candidate where there is no entry in the committees table for that candidate. See line 52 in candidate_contributions_by_type.rb