From 4291fa7da1e8bbdde14ff0f3b352792aa52c0d89 Mon Sep 17 00:00:00 2001 From: pawito236 Date: Wed, 27 Nov 2024 20:19:02 +0700 Subject: [PATCH] Revert "Merge pull request #25 from SAIG-KMITL/dev" This reverts commit e3d7509063967f76cf6a7e5eed7fb31b77040a41, reversing changes made to 439b2fde5ac3d746af9ff60f3494551a20785b95. --- routers/pre_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/pre_test.py b/routers/pre_test.py index f086ff7..e7230f2 100644 --- a/routers/pre_test.py +++ b/routers/pre_test.py @@ -22,6 +22,7 @@ async def qa(body: PreTestRequest): response_topic = body.topics topic_titles = [topic.title for topic in response_topic] topic_amount = len(topic_titles) + amount_per_topic = round(max_question / topic_amount) diff_titles = [diff.level for diff in response_topic] current_amount = 0 n = 0 @@ -29,7 +30,6 @@ async def qa(body: PreTestRequest): final_questions = [] final_json = [] if topic_titles: - amount_per_topic = round(max_question / topic_amount) for t in topic_titles: if topic_amount - n != 1: if amount_per_topic == 1: