mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
warn rather than error out on duplicate fields
This commit is contained in:
parent
f90806277e
commit
a1b359d4ef
1 changed files with 3 additions and 2 deletions
|
@ -129,9 +129,10 @@ class AddCards(QDialog):
|
||||||
|
|
||||||
def addNote(self, note):
|
def addNote(self, note):
|
||||||
note.model()['did'] = self.deckChooser.selectedId()
|
note.model()['did'] = self.deckChooser.selectedId()
|
||||||
if note.dupeOrEmpty():
|
ret = note.dupeOrEmpty()
|
||||||
|
if ret == 1:
|
||||||
showWarning(_(
|
showWarning(_(
|
||||||
"The first field is empty or not unique."),
|
"The first field is empty."),
|
||||||
help="AddItems#AddError")
|
help="AddItems#AddError")
|
||||||
return
|
return
|
||||||
cards = self.mw.col.addNote(note)
|
cards = self.mw.col.addNote(note)
|
||||||
|
|
Loading…
Reference in a new issue