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

Handle missing legislators more intelligently #32

Open
1 of 5 tasks
waldoj opened this issue Dec 8, 2017 · 0 comments
Open
1 of 5 tasks

Handle missing legislators more intelligently #32

waldoj opened this issue Dec 8, 2017 · 0 comments

Comments

@waldoj
Copy link
Member

waldoj commented Dec 8, 2017

When a bill is being inserted, and the legislator doesn't exist in the database, the method of handling it is really poor. It's just a SQL error. Make these improvements, in this priority order:

  • Have the logged error message indicate that this is likely the problem.
  • Create a function to retrieve barebones information about the legislator from the legislature's website, and insert a stub record about that legislator, prior to inserting the bill record. Basic house member data can be easily screen-scraped from the members list (they even generate CSV by screen-scraping their own site).
  • Fetch images House images from e.g. https://memdata.virginiageneralassembly.gov/images/display_image/H0212
  • Ensure that a high-level alert is generated about the stub record, so that I know to build it out (instead of letting a terrible legislator record languish on the site).
  • Rebuild the site menu
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

No branches or pull requests

1 participant