mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix importing of Mnemosyne collections with missing cards
There's no associated scheduling data, but we can at least preserve the note. https://forums.ankiweb.net/t/error-importing-mnemosyne-2-9-deck/65592
This commit is contained in:
parent
65ea013270
commit
8ef208e418
1 changed files with 2 additions and 2 deletions
|
@ -175,8 +175,8 @@ class MnemoFact:
|
||||||
def fact_view(self) -> type[MnemoFactView]:
|
def fact_view(self) -> type[MnemoFactView]:
|
||||||
try:
|
try:
|
||||||
fact_view = self.cards[0].fact_view_id
|
fact_view = self.cards[0].fact_view_id
|
||||||
except IndexError as err:
|
except IndexError:
|
||||||
raise Exception(f"Fact {self.id} has no cards") from err
|
return FrontOnly
|
||||||
|
|
||||||
if fact_view.startswith("1.") or fact_view.startswith("1::"):
|
if fact_view.startswith("1.") or fact_view.startswith("1::"):
|
||||||
return FrontOnly
|
return FrontOnly
|
||||||
|
|
Loading…
Reference in a new issue