cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

Properly handle redirects to interp view #833

Closed chosak closed 7 years ago

chosak commented 7 years ago

This PR fixes a bug with the redirect view for interp sections. When hitting a URL like

https://www.consumerfinance.gov/eregulations/regulation_redirect/1026-Subpart-C-Interp?year=2017&month=6&day=1

the redirect should go to the chrome_interp_view view, not the chrome_section_view view. In practice, this URL currently causes a NoReverseMatch 500 because 1026-Subpart-C doesn't match the section regex required for the chrome_section_view URL pattern.