Skip to content

Commit

Permalink
Fix/New fuzz range for cards currently scheduled beyond their due range
Browse files Browse the repository at this point in the history
  • Loading branch information
user1823 committed Jul 7, 2024
1 parent b6746d7 commit 9c21905
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions schedule/reschedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,17 @@ def apply_fuzz(self, ivl):
# Load balance
due = self.card.odue if self.card.odid else self.card.due
last_review = get_last_review_date(self.card)
if last_review + max_ivl < mw.col.sched.today:
# If the latest possible due date is in the past, skip load balance
return ivl


if self.apply_easy_days:
if due > last_review + max_ivl + 2:
current_ivl = due - last_review
min_ivl, max_ivl = get_fuzz_range(
current_ivl, self.elapsed_days, current_ivl
)

if last_review + max_ivl < mw.col.sched.today:
# If the latest possible due date is in the past, skip load balance
return ivl

# Don't schedule the card in the past
min_ivl = max(min_ivl, mw.col.sched.today - last_review)
Expand Down

0 comments on commit 9c21905

Please sign in to comment.