mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22: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")
|
n = _("Add")
|
||||||
self.parent.deck.setUndoStart(n)
|
self.parent.deck.setUndoStart(n)
|
||||||
try:
|
try:
|
||||||
cards = self.parent.deck.addFact(fact)
|
fact = self.parent.deck.addFact(fact)
|
||||||
except FactInvalidError:
|
except FactInvalidError:
|
||||||
ui.utils.showInfo(_(
|
ui.utils.showInfo(_(
|
||||||
"Some fields are missing or not unique."),
|
"Some fields are missing or not unique."),
|
||||||
parent=self, help="AddItems#AddError")
|
parent=self, help="AddItems#AddError")
|
||||||
return
|
return
|
||||||
if not cards:
|
if not fact.cards:
|
||||||
ui.utils.showWarning(_("""\
|
ui.utils.showWarning(_("""\
|
||||||
The input you have provided would make an empty
|
The input you have provided would make an empty
|
||||||
question or answer on all cards. Can't proceed."""), parent=self)
|
question or answer on all cards. Can't proceed."""), parent=self)
|
||||||
|
|
Loading…
Reference in a new issue