fix: Exclude entries for rescheduling cards when getting review data #853
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is based on #788.
We are getting data about reviews the user did from Anki's review log table. The review log table contains an entry for each review the user does. However entries are also added to the table when the user uses the
Set Due Date
context menu action in the Anki browser to reschedule a card (https://docs.ankiweb.net/browsing.html?highlight=set%20due%20date#cards). These entries have atype
value ofREVLOG_RESCHED
(https://github.com/ankitects/anki/blob/51a10f096940dbd9d86b7a434612e3b8b9469cc7/pylib/anki/consts.py#L92).We should exclude these entries, because they don't represent reviews. This way the review counts we get will be more accurate.
Related issues
fix: Exclude entries for rescheduling cards when getting review data
Proposed changes
REVLOG_RESCHED
type when querying review data.