use human-readable # when generating new cards

This commit is contained in:
Damien Elmes 2012-04-11 18:09:13 +09:00
parent 1077c71c2e
commit 8a6e9945b2

View file

@ -301,8 +301,11 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""",
rem.append(have[nid][t['ord']]) rem.append(have[nid][t['ord']])
# if missing ord and is available, generate # if missing ord and is available, generate
if not doHave and t['ord'] in avail: if not doHave and t['ord'] in avail:
# we'd like to use the same due# as sibling cards, but we
# can't retrieve that quickly, so we give it a new id
# instead
data.append((ts, nid, t['did'] or did, t['ord'], data.append((ts, nid, t['did'] or did, t['ord'],
now, usn, nid)) now, usn, self.nextID("pos")))
ts += 1 ts += 1
# bulk update # bulk update
self.db.executemany(""" self.db.executemany("""