From 0f9408730f44aa5839e21d365ed401d7b8930543 Mon Sep 17 00:00:00 2001 From: Scott Noyes Date: Sat, 2 May 2020 16:18:31 -0500 Subject: [PATCH] Make tags optional when adding notes --- plugin/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/__init__.py b/plugin/__init__.py index 4d1f933..aaad1ed 100644 --- a/plugin/__init__.py +++ b/plugin/__init__.py @@ -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: