mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
ensure crt synced
This commit is contained in:
parent
bd80f31c48
commit
779bcbef39
2 changed files with 9 additions and 0 deletions
|
@ -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):
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue