Merge pull request #353 from snoyes/fix-#352

Fix issue #352
This commit is contained in:
Alexei Yatskov 2022-09-17 14:27:27 -07:00 committed by GitHub
commit 773dc49f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,6 +220,8 @@ class AnkiConnect:
ankiNote[ankiName] = value
break
self.addMediaFromNote(ankiNote, note)
allowDuplicate = False
duplicateScope = None
duplicateScopeDeckName = None
@ -704,8 +706,6 @@ class AnkiConnect:
def addNote(self, note):
ankiNote = self.createNote(note)
self.addMediaFromNote(ankiNote, note)
collection = self.collection()
self.startEditing()
nCardsAdded = collection.addNote(ankiNote)