-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle legacy parameters for further education filters in v2/results
This commit updates the handling of legacy parameters (`age_group` and `qualification`) to ensure compatibility when filtering by "further education" in the old v1 `/results` endpoint. - **SearchCoursesForm**: - Introduced `age_group` and `qualification` attributes. - Added methods to map old parameters (`age_group: 'further_education'` or `qualification: ['pgce pgde']`) to the `level: 'further_education'` parameter. - Ensures `search_params` excludes legacy parameters while still applying their equivalent filtering logic. - **CoursesQuery**: - Simplified logic for `further_education_scope` to focus on `level: 'further_education'`. If a user selects "further education" in the updated v2 filters, legacy v1 requests using 1. `age_group = further_education` (v1 second question) 2. `qualification = ['pgce pgde']` will continue to work. (v1 qualification filter when user chooses further education). This ensures backward compatibility while moving towards the new parameter conventions.
- Loading branch information
1 parent
fa188b5
commit d85c791
Showing
5 changed files
with
69 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters