Make tags optional when adding notes

This commit is contained in:
Scott Noyes 2020-05-02 16:18:31 -05:00
parent e01544a538
commit 0f9408730f

View File

@ -197,7 +197,8 @@ class AnkiConnect:
ankiNote = anki.notes.Note(collection, model)
ankiNote.model()['did'] = deck['id']
ankiNote.tags = note['tags']
if 'tags' in note:
ankiNote.tags = note['tags']
for name, value in note['fields'].items():
if name in ankiNote: