mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
Merge pull request #189 from lukecwilliams/master
Fix issue where null tag list crashes Mnemosyne import
This commit is contained in:
commit
e6c25b90e9
1 changed files with 5 additions and 1 deletions
|
@ -53,8 +53,12 @@ acq_reps+ret_reps, lapses, card_type_id from cards"""):
|
|||
vocabulary.append(note)
|
||||
elif row[1].startswith("5.1"):
|
||||
cloze[row[0]] = note
|
||||
# check for None to fix issue where import can error out
|
||||
rawTags = row[2];
|
||||
if rawTags is None:
|
||||
rawTags = ""
|
||||
# merge tags into note
|
||||
tags = row[2].replace(", ", "\x1f").replace(" ", "_")
|
||||
tags = rawTags.replace(", ", "\x1f").replace(" ", "_")
|
||||
tags = tags.replace("\x1f", " ")
|
||||
if "tags" not in note:
|
||||
note['tags'] = []
|
||||
|
|
Loading…
Reference in a new issue