From 621d11a6da7f3405acf28cb04e4873a0f7ce84d3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 29 Oct 2010 01:05:33 +0900 Subject: [PATCH] don't generate cards if the question is blank, again --- anki/deck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/deck.py b/anki/deck.py index 8325ad155..f9c7ec284 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -1346,8 +1346,10 @@ and due < :now""", now=time.time()) try: if format % local == format % empty: ok = False + break except (KeyError, TypeError, ValueError): ok = False + break if ok or type == "a" and cardModel.allowEmptyAnswer: models.append(cardModel) return models