mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
addFact() now returns fact, not cards
This commit is contained in:
parent
9438fbda13
commit
458c69e3ff
1 changed files with 2 additions and 2 deletions
|
@ -98,13 +98,13 @@ class AddCards(QDialog):
|
|||
n = _("Add")
|
||||
self.parent.deck.setUndoStart(n)
|
||||
try:
|
||||
cards = self.parent.deck.addFact(fact)
|
||||
fact = self.parent.deck.addFact(fact)
|
||||
except FactInvalidError:
|
||||
ui.utils.showInfo(_(
|
||||
"Some fields are missing or not unique."),
|
||||
parent=self, help="AddItems#AddError")
|
||||
return
|
||||
if not cards:
|
||||
if not fact.cards:
|
||||
ui.utils.showWarning(_("""\
|
||||
The input you have provided would make an empty
|
||||
question or answer on all cards. Can't proceed."""), parent=self)
|
||||
|
|
Loading…
Reference in a new issue