single return in sched2 _deckRevLimitSingle

This commit is contained in:
Arthur Milchior 2020-03-01 13:38:42 +01:00
parent c35afd4aaa
commit c4b2ab96a6

View File

@ -867,10 +867,8 @@ and due <= ? limit ?)""",
lim = max(0, c["rev"]["perDay"] - d["revToday"][1])
if parentLimit is not None:
return min(parentLimit, lim)
elif "::" not in d["name"]:
return lim
else:
lim = min(parentLimit, lim)
elif "::" in d["name"]:
for parent in self.col.decks.parents(d["id"]):
# pass in dummy parentLimit so we don't do parent lookup again
lim = min(lim, self._deckRevLimitSingle(parent, parentLimit=lim))