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,7 +198,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: