mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
Merge branch 'master' of github.com:dae/anki
This commit is contained in:
commit
269ea80a1f
1 changed files with 5 additions and 2 deletions
|
@ -304,12 +304,15 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""",
|
|||
snids = ids2str(nids)
|
||||
have = {}
|
||||
dids = {}
|
||||
for id, nid, ord, did in self.db.execute(
|
||||
"select id, nid, ord, did from cards where nid in "+snids):
|
||||
for id, nid, ord, did, odid in self.db.execute(
|
||||
"select id, nid, ord, did, odid from cards where nid in "+snids):
|
||||
# existing cards
|
||||
if nid not in have:
|
||||
have[nid] = {}
|
||||
have[nid][ord] = id
|
||||
# if in a filtered deck, add new cards to original deck
|
||||
if odid != 0:
|
||||
did = odid
|
||||
# and their dids
|
||||
if nid in dids:
|
||||
if dids[nid] and dids[nid] != did:
|
||||
|
|
Loading…
Reference in a new issue