From 658b50561c79afb391d0026462844bcca8591aac Mon Sep 17 00:00:00 2001 From: Rohan Rangray Date: Wed, 3 Jun 2015 16:42:45 -0700 Subject: [PATCH] Attempted fix for the repeating flashcard problem --- flashcards/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flashcards/models.py b/flashcards/models.py index b9574b3..3c3cbc3 100644 --- a/flashcards/models.py +++ b/flashcards/models.py @@ -229,7 +229,7 @@ class UserFlashcard(Model): self.last_response_factor = max(1.3, self.last_response_factor + (0.1 - (5 - q) * (0.08 + (5 - q) * 0.02))) self.last_interval = max(1, self.last_interval + (now() - self.next_review).days) self.last_interval = int(round(self.last_interval * self.last_response_factor)) - self.next_review = user_flashcard_quiz.when + timedelta(days=self.last_interval) + self.next_review = now() + timedelta(days=self.last_interval) self.save() class Meta: -- 1.9.1