diff --git a/anki/sync.py b/anki/sync.py index 3aed27092..4715eb304 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -149,6 +149,7 @@ Sanity check failed. Please copy and paste the text below:\n%s\n%s""" % (c, s)) tags=self.getTags()) if self.lnewer: d['conf'] = self.getConf() + d['crt'] = self.col.crt return d def applyChanges(self, changes): @@ -165,6 +166,9 @@ Sanity check failed. Please copy and paste the text below:\n%s\n%s""" % (c, s)) self.mergeTags(rchg['tags']) if 'conf' in rchg: self.mergeConf(rchg['conf']) + # this was left out of earlier betas + if 'crt' in rchg: + self.col.crt = rchg['crt'] self.prepareToChunk() def sanityCheck(self): diff --git a/tests/test_sync.py b/tests/test_sync.py index 2aae3d66a..8bdf48ece 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -90,6 +90,11 @@ def test_sync(): deck1.save() assert client.sync() == "success" check(2) + # crt should be synced + deck1.crt = 123 + deck1.setMod() + assert client.sync() == "success" + assert deck1.crt == deck2.crt @nose.with_setup(setup_modified) def test_models():