Merge pull request #49 from cecini/remshouldgravemax
Fix: server side graves's usn need not set as -1
This commit is contained in:
commit
bf0ad80dbe
@ -64,7 +64,7 @@ class CollectionWrapper:
|
||||
return col
|
||||
|
||||
def _get_collection(self):
|
||||
col = anki.storage.Collection(self.path)
|
||||
col = anki.storage.Collection(self.path, server=True)
|
||||
|
||||
# Ugly hack, replace default media manager with our custom one
|
||||
col.media.close()
|
||||
|
||||
@ -185,8 +185,6 @@ from notes where %s""" % lim, self.maxUsn)
|
||||
return dict(cards=cards, notes=notes, decks=decks)
|
||||
|
||||
def remove(self, graves):
|
||||
# pretend to be the server so we don't set usn = -1
|
||||
self.col.server = True
|
||||
|
||||
# notes first, so we don't end up with duplicate graves
|
||||
self.col._remNotes(graves['notes'])
|
||||
@ -196,7 +194,6 @@ from notes where %s""" % lim, self.maxUsn)
|
||||
for oid in graves['decks']:
|
||||
self.col.decks.rem(oid)
|
||||
|
||||
self.col.server = False
|
||||
|
||||
# Models
|
||||
##########################################################################
|
||||
|
||||
Loading…
Reference in New Issue
Block a user