diff --git a/routers/sentences.py b/routers/sentences.py index 8af1b4f..83f3ce4 100644 --- a/routers/sentences.py +++ b/routers/sentences.py @@ -236,7 +236,7 @@ async def check_sentence(request: Request): raise HTTPException(404, "Sentence not found") existing_progress = await conn.fetchrow( - "SELECT score, completed_at FROM sentence_progress WHERE user_id = $1 AND sentence_id = $2", + "SELECT score, completed_at FROM sentence_progress WHERE user_id = $1 AND sentence_id = $2 AND completed_at IS NOT NULL", telegram_id, sentence_id )