Closed JonellaCulmer closed 3 weeks ago
The api_caller
is still searching our api regulations endpoint (which will be removed ) and that is where is gets its results["regulations_returned"]
count that is currently used in the template for this tag.
Our api returns 3 results: https://api.open.fec.gov/v1/legal/search/?q=105&type=regulations&api_key=DEMO_KEY
The new regulations search using eCFR returns 2: https://www.ecfr.gov/api/search/v1/results?query=105&agency_slugs%5B%5D=federal-election-commission&date=current&per_page=3&page=1&order=relevance&paginate_by=results
--or-- https://www.fec.gov/data/legal/search/regulations/?search=105&search_type=regulations
Fix: We just need to remove the reference to regulations in api_caller and add results["regulations_returned"]
to legal_search()
in legal/views.py
Summary
Small bug with the counts for regulations on the search across legal resources search results. https://www.fec.gov/data/legal/search/?search_type=regulations&search=105
Related Tickets
Screenshots
Completion criteria