Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve empty enrollment history entries (#64)
<!--- Provide a general summary of your changes in the Title above --> ## Description Fixed the issue where the enrollment history endpoint was returning entries for terms without enrollment data. Now, the endpoint only returns entries for terms with actual enrollment data, ensuring that each entry has at least one data point. <!--- Describe your changes in detail --> ## Related Issue This pull request addresses issue [#31](#31). <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> This change is required to prevent unintentional behavior in consumers of the enrollment history endpoint. By ensuring that only terms with enrollment data are returned, we avoid empty data arrays that could cause issues or unexpected behavior in downstream applications. ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> Tested on a local deployment by using the pnpm environment. Minor changes. None affects other code. ## Screenshots (if appropriate): Before(includes the empty data sections): <img width="1383" alt="Screenshot 2025-01-06 at 09 54 58" src="https://github.com/user-attachments/assets/43f04f6d-ac2b-4f57-affd-921d516f50c6" /> After(removed the empty data sections): <img width="1394" alt="Screenshot 2025-01-06 at 09 55 21" src="https://github.com/user-attachments/assets/6e84ab49-7552-4da5-b130-bc398c7a3862" /> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code involves a change to the database schema. - [ ] My code requires a change to the documentation. --------- Co-authored-by: Eddy Chen <[email protected]>
- Loading branch information