make sure we don't put suspended leeches back in the learning queue
fixes https://anki.tenderapp.com/discussions/beta-testing/1119-anki-210-beta-38#comment_45555453
This commit is contained in:
parent
b5e33aafac
commit
c0c33a2b58
@ -837,19 +837,20 @@ select id from cards where did in %s and queue = 2 and due <= ? limit ?)"""
|
|||||||
card.lapses += 1
|
card.lapses += 1
|
||||||
card.factor = max(1300, card.factor-200)
|
card.factor = max(1300, card.factor-200)
|
||||||
|
|
||||||
if conf['delays']:
|
suspended = self._checkLeech(card, conf) and card.queue == -1
|
||||||
|
|
||||||
|
if conf['delays'] and not suspended:
|
||||||
card.type = 3
|
card.type = 3
|
||||||
delay = self._moveToFirstStep(card, conf)
|
delay = self._moveToFirstStep(card, conf)
|
||||||
else:
|
else:
|
||||||
# no relearning steps
|
# no relearning steps
|
||||||
self._updateRevIvlOnFail(card, conf)
|
self._updateRevIvlOnFail(card, conf)
|
||||||
self._rescheduleAsRev(card, conf, early=False)
|
self._rescheduleAsRev(card, conf, early=False)
|
||||||
|
# need to reset the queue after rescheduling
|
||||||
|
if suspended:
|
||||||
|
card.queue = -1
|
||||||
delay = 0
|
delay = 0
|
||||||
|
|
||||||
# if suspended as a leech, nothing to do
|
|
||||||
if self._checkLeech(card, conf) and card.queue == -1:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
return delay
|
return delay
|
||||||
|
|
||||||
def _lapseIvl(self, card, conf):
|
def _lapseIvl(self, card, conf):
|
||||||
|
Loading…
Reference in New Issue
Block a user