From a1b359d4efa591828c6f8fd6588c14914d5288ea Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 6 Sep 2012 03:54:58 +0900 Subject: [PATCH] warn rather than error out on duplicate fields --- aqt/addcards.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/aqt/addcards.py b/aqt/addcards.py index 2dcce3555..ccc7e8a38 100644 --- a/aqt/addcards.py +++ b/aqt/addcards.py @@ -129,9 +129,10 @@ class AddCards(QDialog): def addNote(self, note): note.model()['did'] = self.deckChooser.selectedId() - if note.dupeOrEmpty(): + ret = note.dupeOrEmpty() + if ret == 1: showWarning(_( - "The first field is empty or not unique."), + "The first field is empty."), help="AddItems#AddError") return cards = self.mw.col.addNote(note)