mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix extending limits in custom study
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save
This commit is contained in:
parent
8f207cc900
commit
0c85397461
2 changed files with 4 additions and 3 deletions
|
@ -200,7 +200,7 @@ order by due"""
|
||||||
cur = self.col.decks.current()
|
cur = self.col.decks.current()
|
||||||
parents = self.col.decks.parents(cur["id"])
|
parents = self.col.decks.parents(cur["id"])
|
||||||
children = [
|
children = [
|
||||||
self.col.decks.get(did) for did in self.col.decks.child_ids(cur["id"])
|
self.col.decks.get(did) for did in self.col.decks.child_ids(cur["name"])
|
||||||
]
|
]
|
||||||
for g in [cur] + parents + children:
|
for g in [cur] + parents + children:
|
||||||
self._update_stats(g, "new", -new)
|
self._update_stats(g, "new", -new)
|
||||||
|
|
|
@ -261,8 +261,9 @@ impl From<&DeckCommonSchema11> for DeckCommon {
|
||||||
// since we're combining the day values into a single value,
|
// since we're combining the day values into a single value,
|
||||||
// any items from an earlier day need to be reset
|
// any items from an earlier day need to be reset
|
||||||
let mut today = common.today.clone();
|
let mut today = common.today.clone();
|
||||||
// time is always updated, so will always be the latest
|
// study will always update 'time', but custom study may only update
|
||||||
let max_day = today.time.day;
|
// 'rev' or 'new'
|
||||||
|
let max_day = today.time.day.max(today.new.day).max(today.rev.day);
|
||||||
if today.lrn.day != max_day {
|
if today.lrn.day != max_day {
|
||||||
today.lrn.amount = 0;
|
today.lrn.amount = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue