mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
ensure nextPos is not null
This commit is contained in:
parent
a99101d95c
commit
d60a3f8e25
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ insert into revlog values (?,?,?,?,?,?,?,?,?)""", revlog)
|
||||||
if self.needCards:
|
if self.needCards:
|
||||||
# make sure new position is correct
|
# make sure new position is correct
|
||||||
self.dst.conf['nextPos'] = self.dst.db.scalar(
|
self.dst.conf['nextPos'] = self.dst.db.scalar(
|
||||||
"select max(due)+1 from cards where type = 0")
|
"select max(due)+1 from cards where type = 0") or 0
|
||||||
else:
|
else:
|
||||||
# newly added models will have been flagged with needWizard=1; we
|
# newly added models will have been flagged with needWizard=1; we
|
||||||
# need to mark reused models with needWizard=2 so the new cards
|
# need to mark reused models with needWizard=2 so the new cards
|
||||||
|
|
Loading…
Reference in a new issue