From 3cf770c73c869f03d2d9147fe0f73bc1a521e58e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 11 Mar 2019 13:49:58 +1000 Subject: [PATCH] Revert "moveTemplate slightly quicker" This reverts commit b29fd508c77f90bc41ffd3ad4c3fce3d0cba608e. This caused a regression: https://github.com/dae/anki/pull/294 --- anki/models.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/anki/models.py b/anki/models.py index b421554cf..9da5822bb 100644 --- a/anki/models.py +++ b/anki/models.py @@ -396,10 +396,7 @@ update cards set ord = ord - 1, usn = ?, mod = ? # generate change map map = [] for t in m['tmpls']: - oldidx = oldidxs[id(t)] - newidx = t['ord'] - if oldidx != newidx: - map.append("when ord = %d then %d" % (oldidx, newidx)) + map.append("when ord = %d then %d" % (oldidxs[id(t)], t['ord'])) # apply self.save(m) self.col.db.execute("""