mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 05:52:22 -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]:
|
||||
try:
|
||||
fact_view = self.cards[0].fact_view_id
|
||||
except IndexError as err:
|
||||
raise Exception(f"Fact {self.id} has no cards") from err
|
||||
except IndexError:
|
||||
return FrontOnly
|
||||
|
||||
if fact_view.startswith("1.") or fact_view.startswith("1::"):
|
||||
return FrontOnly
|
||||
|
|
Loading…
Reference in a new issue