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:
Damien Elmes 2025-09-01 18:25:20 +10:00
parent 65ea013270
commit 8ef208e418

View file

@ -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