mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
work around some decks with mod time stored as string
This commit is contained in:
parent
118326df1e
commit
6113785b2f
1 changed files with 4 additions and 0 deletions
|
@ -373,6 +373,10 @@ from notes where %s""" % d)
|
||||||
def mergeDecks(self, rchg):
|
def mergeDecks(self, rchg):
|
||||||
for r in rchg[0]:
|
for r in rchg[0]:
|
||||||
l = self.col.decks.get(r['id'], False)
|
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 missing locally or server is newer, update
|
||||||
if not l or r['mod'] > l['mod']:
|
if not l or r['mod'] > l['mod']:
|
||||||
self.col.decks.update(r)
|
self.col.decks.update(r)
|
||||||
|
|
Loading…
Reference in a new issue