mirror of
https://github.com/ankitects/anki.git
synced 2025-11-10 22:57:11 -05:00
when generating cards, use a small creation date increment
This commit is contained in:
parent
27694adf1a
commit
80197d9c2f
1 changed files with 2 additions and 1 deletions
|
|
@ -1117,8 +1117,9 @@ and due < :now""" % self.forceIndex("ix_cards_priorityDue"), now=time.time())
|
||||||
select count(id) from cards
|
select count(id) from cards
|
||||||
where factId = :fid and cardModelId = :cmid""",
|
where factId = :fid and cardModelId = :cmid""",
|
||||||
fid=fact.id, cmid=cardModel.id) == 0:
|
fid=fact.id, cmid=cardModel.id) == 0:
|
||||||
|
# enough for 10 card models assuming 0.00001 timer precision
|
||||||
card = anki.cards.Card(
|
card = anki.cards.Card(
|
||||||
fact, cardModel, created=fact.created+cardModel.ordinal)
|
fact, cardModel, created=fact.created+0.000001*cardModel.ordinal)
|
||||||
self.updateCardTags([card.id])
|
self.updateCardTags([card.id])
|
||||||
self.updatePriority(card)
|
self.updatePriority(card)
|
||||||
self.cardCount += 1
|
self.cardCount += 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue