Merge pull request #163 from snoyes/makeTagsOptional

Make tags optional when adding notes
This commit is contained in:
Alex Yatskov 2020-05-02 16:17:50 -07:00 committed by GitHub
commit 457e76e720
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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