diff --git a/pylib/anki/cards.py b/pylib/anki/cards.py index 9c35b0c4e..f8ac57314 100644 --- a/pylib/anki/cards.py +++ b/pylib/anki/cards.py @@ -124,30 +124,6 @@ insert or replace into cards values ) self.col.log(self) - def flushSched(self) -> None: - self._preFlush() - # bug checks - self.col.db.execute( - """update cards set -mod=?, usn=?, type=?, queue=?, due=?, ivl=?, factor=?, reps=?, -lapses=?, left=?, odue=?, odid=?, did=? where id = ?""", - self.mod, - self.usn, - self.type, - self.queue, - self.due, - self.ivl, - self.factor, - self.reps, - self.lapses, - self.left, - self.odue, - self.odid, - self.did, - self.id, - ) - self.col.log(self) - def question(self, reload: bool = False, browser: bool = False) -> str: return self.css() + self.render_output(reload, browser).question_text @@ -181,6 +157,8 @@ lapses=?, left=?, odue=?, odid=?, did=? where id = ?""", def note_type(self) -> NoteType: return self.col.models.get(self.note().mid) + # legacy aliases + flushSched = flush q = question a = answer model = note_type diff --git a/pylib/anki/sched.py b/pylib/anki/sched.py index 982da8b59..af426d744 100644 --- a/pylib/anki/sched.py +++ b/pylib/anki/sched.py @@ -80,7 +80,7 @@ class Scheduler(V2): self._updateStats(card, "time", card.timeTaken()) card.mod = intTime() card.usn = self.col.usn() - card.flushSched() + card.flush() def counts(self, card: Optional[Card] = None) -> Tuple[int, int, int]: counts = [self.newCount, self.lrnCount, self.revCount] diff --git a/pylib/anki/schedv2.py b/pylib/anki/schedv2.py index 67aa6c4db..c6ecc6efc 100644 --- a/pylib/anki/schedv2.py +++ b/pylib/anki/schedv2.py @@ -82,7 +82,7 @@ class Scheduler: self._updateStats(card, "time", card.timeTaken()) card.mod = intTime() card.usn = self.col.usn() - card.flushSched() + card.flush() def _answerCard(self, card: Card, ease: int) -> None: if self._previewingCard(card):