-
Notifications
You must be signed in to change notification settings - Fork 3
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
Resolve empty enrollment history entries #31
Labels
good first task
Good for newcomers
Comments
2 tasks
5 tasks
andrew-wang0
pushed a commit
that referenced
this issue
Jan 15, 2025
<!--- 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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
The enrollment history endpoint should not return entries for terms for which we do not have enrollment data.
Current Behavior
The enrollment history endpoint returns entries for terms for which we do not have enrollment data. In these entries, the time series data are all empty arrays.
This can lead to unintentional behavior in consumers if they assume that any entry will have at least one datapoint.
The text was updated successfully, but these errors were encountered: