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)