Skip to content
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

[Data rearchitecture] Fix minor bug in RevisionStatTimeslice #6186

Conversation

gabina
Copy link
Member

@gabina gabina commented Feb 7, 2025

What this PR does

This PR fixes a bug in RevisionStatTimeslice. Since the TIMEFRAME is set to 7 days, the recent_revisions_for_courses_user method fails if a course started yesterday because it attempts to retrieve a course wiki timeslice from seven days ago, which doesn't exist.

This fix ensures that the start period never references a date earlier than the course start date.

Open questions and concerns

< anything you learned that you want to share, or questions you're wondering about related to this PR >

…is set to 7 days. If the course start is less that one week ago, we don't want to try to retrieve a timeslice for 7 days ago because that timeslice won't exist. Because of that, now we fix the start period for the timeframe as the max between course start or 7 days ago.
@gabina gabina marked this pull request as ready for review February 9, 2025 23:17
@gabina gabina merged commit 08b4e0d into WikiEducationFoundation:data-rearchitecture-for-dashboard Feb 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant