From 2df2231dc58f5107363bcccb827b283674ee229e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 5 May 2012 01:09:11 +0900 Subject: [PATCH] catch attempts to write queue=2 odue>0 --- anki/cards.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/anki/cards.py b/anki/cards.py index 5e455899f..5034bc3fd 100644 --- a/anki/cards.py +++ b/anki/cards.py @@ -70,6 +70,8 @@ class Card(object): def flush(self): self.mod = intTime() self.usn = self.col.usn() + # bug check + assert not (self.queue == 2 and self.odue) self.col.db.execute( """ insert or replace into cards values @@ -96,6 +98,8 @@ insert or replace into cards values def flushSched(self): self.mod = intTime() self.usn = self.col.usn() + # bug check + assert not (self.queue == 2 and self.odue) self.col.db.execute( """update cards set mod=?, usn=?, type=?, queue=?, due=?, ivl=?, factor=?, reps=?,