mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
no longer need to check addNote's return value
This commit is contained in:
parent
24ffb6ab76
commit
f1c5c88c10
1 changed files with 1 additions and 11 deletions
|
@ -177,17 +177,7 @@ class AddCards(QDialog):
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
return None
|
return None
|
||||||
cards = self.mw.col.addNote(note)
|
self.mw.col.add_note(note, self.deckChooser.selectedId())
|
||||||
if not cards:
|
|
||||||
showWarning(
|
|
||||||
_(
|
|
||||||
"""\
|
|
||||||
The input you have provided would make an empty \
|
|
||||||
question on all cards."""
|
|
||||||
),
|
|
||||||
help="AddItems",
|
|
||||||
)
|
|
||||||
return None
|
|
||||||
self.mw.col.clearUndo()
|
self.mw.col.clearUndo()
|
||||||
self.addHistory(note)
|
self.addHistory(note)
|
||||||
self.mw.requireReset()
|
self.mw.requireReset()
|
||||||
|
|
Loading…
Reference in a new issue