Merge pull request #363 from ig3/bug/new-perday

Use _deckNewLimitSingle in _groupChildrenMain
This commit is contained in:
Damien Elmes 2019-12-21 07:41:18 +10:00 committed by GitHub
commit f0f9278414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
if not conf['dyn']:
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))
return tuple(tree)

View File

@ -294,7 +294,7 @@ order by due""" % self._deckLimit(),
conf = self.col.decks.confForDid(did)
deck = self.col.decks.get(did)
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))
return tuple(tree)