mirror of
https://github.com/ankitects/anki.git
synced 2025-12-31 07:43:02 -05:00
don't error when fuzz is 0
https://anki.tenderapp.com/discussions/ankidesktop/38956-bug-report-sched2-anki2120
This commit is contained in:
parent
8f2addcc86
commit
4b53271ad0
1 changed files with 1 additions and 1 deletions
|
|
@ -671,7 +671,7 @@ did = ? and queue = {QUEUE_TYPE_DAY_LEARN_RELEARN} and due <= ? limit ?""",
|
||||||
if card.due < self.dayCutoff:
|
if card.due < self.dayCutoff:
|
||||||
# add some randomness, up to 5 minutes or 25%
|
# add some randomness, up to 5 minutes or 25%
|
||||||
maxExtra = min(300, int(delay * 0.25))
|
maxExtra = min(300, int(delay * 0.25))
|
||||||
fuzz = random.randrange(0, maxExtra)
|
fuzz = random.randrange(0, max(1, maxExtra))
|
||||||
card.due = min(self.dayCutoff - 1, card.due + fuzz)
|
card.due = min(self.dayCutoff - 1, card.due + fuzz)
|
||||||
card.queue = 1
|
card.queue = 1
|
||||||
if card.due < (intTime() + self.col.conf["collapseTime"]):
|
if card.due < (intTime() + self.col.conf["collapseTime"]):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue