Merge pull request #83 from dobefore/NoneType_41_

This commit is contained in:
Vikash Kothary 2021-08-15 14:02:54 +01:00 committed by GitHub
commit 07723e9cf6
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