single return in sched2 _deckRevLimitSingle
This commit is contained in:
parent
c35afd4aaa
commit
c4b2ab96a6
@ -867,14 +867,12 @@ and due <= ? limit ?)""",
|
|||||||
lim = max(0, c["rev"]["perDay"] - d["revToday"][1])
|
lim = max(0, c["rev"]["perDay"] - d["revToday"][1])
|
||||||
|
|
||||||
if parentLimit is not None:
|
if parentLimit is not None:
|
||||||
return min(parentLimit, lim)
|
lim = min(parentLimit, lim)
|
||||||
elif "::" not in d["name"]:
|
elif "::" in d["name"]:
|
||||||
return lim
|
|
||||||
else:
|
|
||||||
for parent in self.col.decks.parents(d["id"]):
|
for parent in self.col.decks.parents(d["id"]):
|
||||||
# pass in dummy parentLimit so we don't do parent lookup again
|
# pass in dummy parentLimit so we don't do parent lookup again
|
||||||
lim = min(lim, self._deckRevLimitSingle(parent, parentLimit=lim))
|
lim = min(lim, self._deckRevLimitSingle(parent, parentLimit=lim))
|
||||||
return lim
|
return lim
|
||||||
|
|
||||||
def _revForDeck(self, did: int, lim: int, childMap: Dict[int, Any]) -> Any:
|
def _revForDeck(self, did: int, lim: int, childMap: Dict[int, Any]) -> Any:
|
||||||
dids = [did] + self.col.decks.childDids(did, childMap)
|
dids = [did] + self.col.decks.childDids(did, childMap)
|
||||||
|
Loading…
Reference in New Issue
Block a user