Skip to content

Commit

Permalink
Revert "moveTemplate slightly quicker"
Browse files Browse the repository at this point in the history
This reverts commit b29fd50.

This caused a regression:
ankitects#294
  • Loading branch information
dae committed Mar 11, 2019
1 parent 44952ff commit 3cf770c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions anki/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,7 @@ def moveTemplate(self, m, template, idx):
# 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("""
Expand Down

0 comments on commit 3cf770c

Please sign in to comment.