mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -04:00
make sure we don't modify the active decks during scheduling
This commit is contained in:
parent
e9a87b9fd9
commit
5c5341b5e5
2 changed files with 3 additions and 3 deletions
|
@ -335,7 +335,7 @@ class DeckManager(object):
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
def active(self):
|
def active(self):
|
||||||
"The currrently active dids."
|
"The currrently active dids. Make sure to copy before modifying."
|
||||||
return self.col.conf['activeDecks']
|
return self.col.conf['activeDecks']
|
||||||
|
|
||||||
def selected(self):
|
def selected(self):
|
||||||
|
|
|
@ -274,7 +274,7 @@ did = ? and queue = 0 limit ?)""", did, lim)
|
||||||
|
|
||||||
def _resetNew(self):
|
def _resetNew(self):
|
||||||
self._resetNewCount()
|
self._resetNewCount()
|
||||||
self._newDids = self.col.decks.active()
|
self._newDids = self.col.decks.active()[:]
|
||||||
self._newQueue = []
|
self._newQueue = []
|
||||||
self._updateNewCardRatio()
|
self._updateNewCardRatio()
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ did = ? and queue = 2 and due <= ? limit %d)""" % lim,
|
||||||
def _resetRev(self):
|
def _resetRev(self):
|
||||||
self._resetRevCount()
|
self._resetRevCount()
|
||||||
self._revQueue = []
|
self._revQueue = []
|
||||||
self._revDids = self.col.decks.active()
|
self._revDids = self.col.decks.active()[:]
|
||||||
|
|
||||||
def _fillRev(self):
|
def _fillRev(self):
|
||||||
if self._revQueue:
|
if self._revQueue:
|
||||||
|
|
Loading…
Reference in a new issue