Use _deckNewLimitSingle in _groupChildrenMain

This commit is contained in:
Ian Goodacre 2019-12-21 09:26:51 +13:00
parent 59ce08bc4e
commit 329ca71436
2 changed files with 2 additions and 2 deletions

View file

@ -293,7 +293,7 @@ order by due""" % self._deckLimit(),
deck = self.col.decks.get(did) deck = self.col.decks.get(did)
if not conf['dyn']: if not conf['dyn']:
rev = max(0, min(rev, conf['rev']['perDay']-deck['revToday'][1])) rev = max(0, min(rev, conf['rev']['perDay']-deck['revToday'][1]))
new = max(0, min(new, conf['new']['perDay']-deck['newToday'][1])) new = max(0, min(new, self._deckNewLimitSingle(deck)))
tree.append((head, did, rev, lrn, new, children)) tree.append((head, did, rev, lrn, new, children))
return tuple(tree) return tuple(tree)

View file

@ -294,7 +294,7 @@ order by due""" % self._deckLimit(),
conf = self.col.decks.confForDid(did) conf = self.col.decks.confForDid(did)
deck = self.col.decks.get(did) deck = self.col.decks.get(did)
if not conf['dyn']: if not conf['dyn']:
new = max(0, min(new, conf['new']['perDay']-deck['newToday'][1])) new = max(0, min(new, self._deckNewLimitSingle(deck)))
tree.append((head, did, rev, lrn, new, children)) tree.append((head, did, rev, lrn, new, children))
return tuple(tree) return tuple(tree)