From 8bc7e0c945765daedebe12aafd645028306e36c3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 17 Aug 2009 05:05:50 +0900 Subject: [PATCH] enforce ordinal ordering when importing --- anki/importing/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/anki/importing/__init__.py b/anki/importing/__init__.py index 9fdfe229b..8c177bee6 100644 --- a/anki/importing/__init__.py +++ b/anki/importing/__init__.py @@ -196,9 +196,10 @@ where factId in (%s)""" % ",".join([str(s) for s in factIds])) "Add any scheduling metadata to cards" if 'fields' in card.__dict__: del card.fields - data['created'] = self._now - data['modified'] = self._now - data['due'] = self._now + t = self._now + data['ordinal'] + data['created'] = t + data['modified'] = t + data['due'] = t self._now += .00001 data.update(card.__dict__) self.cardIds.append(data['id'])