Skip to content

Commit

Permalink
Merge pull request #25 from SAIG-KMITL/dev
Browse files Browse the repository at this point in the history
Deployment - Fix generate-pretest
  • Loading branch information
BikiniGordon authored Nov 26, 2024
2 parents 439b2fd + 9ef6904 commit e3d7509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/pre_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ 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
max_retries = 3
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:
Expand Down

0 comments on commit e3d7509

Please sign in to comment.