Skip to content

Commit

Permalink
Fix/New fuzz range for cards currently scheduled beyond their due ran…
Browse files Browse the repository at this point in the history
…ge (#433)

Co-authored-by: Jarrett Ye <[email protected]>
  • Loading branch information
user1823 and L-M-Sherlock authored Jul 7, 2024
1 parent d495a9b commit 8f3e296
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions schedule/reschedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ 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:
Expand All @@ -98,6 +95,10 @@ def apply_fuzz(self, ivl):
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 8f3e296

Please sign in to comment.