[Eva] ChooseWord /next: LIMIT по wrong_count

This commit is contained in:
2026-10-15 17:01:41 +00:00
parent 279fc5f313
commit edf29cb806
+1 -1
View File
@@ -76,7 +76,7 @@ async def get_next_quiz(request: Request):
FROM csv_words FROM csv_words
WHERE level_code = $1 AND word_pl != $2 AND word_pl NOT IN ({placeholders}) WHERE level_code = $1 AND word_pl != $2 AND word_pl NOT IN ({placeholders})
ORDER BY RANDOM() ORDER BY RANDOM()
LIMIT 5 LIMIT (wrong_count + 1)
""", current_level, correct_polish, *exclude_for_wrong) """, current_level, correct_polish, *exclude_for_wrong)
if len(wrong_words) < 2: if len(wrong_words) < 2: