Update sync_app.py

This commit is contained in:
dobefore 2021-04-27 19:28:37 +08:00 committed by GitHub
parent 811ae45d58
commit 7d8c22c86d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,10 @@ class SyncCollectionHandler(Syncer):
self.minUsn = minUsn
self.lnewer = not lnewer
lgraves = self.removed()
# convert grave:None to {'cards': [], 'notes': [], 'decks': []}
# because req.POST['data'] returned value of grave is None
if graves==None:
graves={'cards': [], 'notes': [], 'decks': []}
self.remove(graves)
return lgraves