From ada1cd04b751f0ed17496dc799618ad8309f6cbc Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 2 Dec 2008 16:41:25 +0900 Subject: [PATCH] check for null sources --- anki/deck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/deck.py b/anki/deck.py index a9bcb0579..cce5e4278 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -1516,6 +1516,8 @@ select id from fields where factId not in (select id from facts)""") self.s.statement("update cards set isDue = 0") # fix problems with conflicts on merge self.s.statement("update fields set id = random()") + # model sources null? + self.s.statement("update models set source = 0 where source is null") # fix any priorities self.updateAllPriorities() # fix problems with stripping html