diff --git a/routers/sentences.py b/routers/sentences.py index 1a29a3a..27d1666 100644 --- a/routers/sentences.py +++ b/routers/sentences.py @@ -113,7 +113,7 @@ async def get_next_sentence(request: Request): SELECT s.* FROM sentences s WHERE s.level = $1 AND s.id NOT IN ( - SELECT sentence_id FROM sentence_progress WHERE user_id = $2 + SELECT sentence_id FROM sentence_progress WHERE user_id = $2 AND completed_at IS NOT NULL ) ORDER BY RANDOM() LIMIT 1