Remove calls to deprecated (and empty) method autosave

This commit is contained in:
Philipp Matthias Schäfer 2024-04-25 10:06:26 +02:00 committed by Alex Yatskov
parent 172d1fb20f
commit 6a2cc2dec1

View File

@ -742,7 +742,6 @@ class AnkiConnect:
nCardsAdded = collection.addNote(ankiNote) nCardsAdded = collection.addNote(ankiNote)
if nCardsAdded < 1: if nCardsAdded < 1:
raise Exception('The field values you have provided would make an empty question on all cards.') raise Exception('The field values you have provided would make an empty question on all cards.')
collection.autosave()
return ankiNote.id return ankiNote.id
@ -832,8 +831,6 @@ class AnkiConnect:
ankiNote.flush() ankiNote.flush()
self.collection().autosave()
@util.api() @util.api()
def updateNote(self, note): def updateNote(self, note):
@ -899,9 +896,6 @@ class AnkiConnect:
# Flush changes to ensure they are saved # Flush changes to ensure they are saved
anki_note.flush() anki_note.flush()
# Save changes to the collection
collection.autosave()
@util.api() @util.api()
def updateNoteTags(self, note, tags): def updateNoteTags(self, note, tags):
if type(tags) == str: if type(tags) == str: