From 6113785b2f48e5a417596b9852d46db95d92aa1e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 19 Jan 2018 11:42:06 +1000 Subject: [PATCH] work around some decks with mod time stored as string --- anki/sync.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/anki/sync.py b/anki/sync.py index c49ad59d7..35dfa469b 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -373,6 +373,10 @@ from notes where %s""" % d) def mergeDecks(self, rchg): for r in rchg[0]: l = self.col.decks.get(r['id'], False) + # work around mod time being stored as string + if l and not isinstance(l['mod'], int): + l['mod'] = int(l['mod']) + # if missing locally or server is newer, update if not l or r['mod'] > l['mod']: self.col.decks.update(r)