From 04fb2df9958d57dc16a4289a6635c5905d771c2e Mon Sep 17 00:00:00 2001 From: David Snopek Date: Thu, 1 Aug 2013 21:45:16 +0100 Subject: [PATCH] Correctly store 'time' in the revlog, when 'timerStarted' is passed to 'answer_card'. --- AnkiServer/apps/rest_app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AnkiServer/apps/rest_app.py b/AnkiServer/apps/rest_app.py index efd8452..c8a8188 100644 --- a/AnkiServer/apps/rest_app.py +++ b/AnkiServer/apps/rest_app.py @@ -517,8 +517,10 @@ class CollectionHandler(RestHandlerBase): ease = int(req.data['ease']) card = col.getCard(card_id) - if card.timerStarted is None: - card.timerStarted = float(req.data.get('timeStarted', time.time())) + if req.data.has_key('timerStarted'): + card.timerStarted = float(req.data['timerStarted']) + else: + card.timerStarted = time.time() col.sched.answerCard(card, ease)