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

404 for House Candidates with only election year 2020 and cycle 2018 #2463

Closed
2 of 4 tasks
Tracked by #143
patphongs opened this issue Oct 22, 2018 · 2 comments
Closed
2 of 4 tasks
Tracked by #143
Assignees
Milestone

Comments

@patphongs
Copy link
Member

patphongs commented Oct 22, 2018

User story: As a new candidate running in a future election (currently 2020/2022), I need to be able to see my candidate profile page even during 2018.

When looking at house candidate pages with only an election_year defined as 2020 and only a cycle defined as 2018, we get a 404 error. It currently appears that only House candidate are impacted.

Examples of these types of candidates that were found include:

https://www.fec.gov/data/candidate/H0FL18173
https://www.fec.gov/data/candidate/H0TX24134
https://www.fec.gov/data/candidate/H0FL01112
https://www.fec.gov/data/candidate/H0FL22050
https://www.fec.gov/data/candidate/H0GA06150
https://www.fec.gov/data/candidate/H0FL04124

These Senate and Presidential candidates also have the 2020 candidate election year and 2018 fec_election_yr but they don't have the problem that the House candidates do:

S0CO00419
S0CO00427
S0NC00277
S0SC00230
S0SC00255
S0KY00271

P00007393
P00006338
P00004911
P00007633
P00006809
P00005660

Completion criteria:

  • @jwchumley is going to check for other affected candidates
  • Write a test for it, figure out why it's failing and mimic that behavior with a test
  • Check House, Senate and Presidential just in case
  • Note: This area has the potential to break other things. Tread lightly.
@patphongs patphongs added the Bug label Oct 23, 2018
@AmyKort AmyKort added this to the Sprint 7.5 milestone Oct 24, 2018
@JonellaCulmer
Copy link
Contributor

This ticket (#2349) lays good groundwork for solving this issue.

lbeaufort added a commit to fecgov/openFEC that referenced this issue Nov 8, 2018
Resolves fecgov/fec-cms#2463

For new house candidates that file for a future election,
  the 2-year period will equal `prev_election_yr`
  until we reach the 2-year period for that future election.

This `>=` (rather than `>`) guarantees results for candidate pages.

A `SELECT DISTINCT` on `candidate_id` prevents duplicate rows.
lbeaufort added a commit to fecgov/openFEC that referenced this issue Nov 9, 2018
Resolves fecgov/fec-cms#2463

For new house candidates that file for a future election,
  the 2-year period will equal `prev_election_yr`
  until we reach the 2-year period for that future election.

This `>=` (rather than `>`) guarantees results for candidate pages.

A `SELECT DISTINCT` on `candidate_id` prevents duplicate rows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants