Skip to content

Commit

Permalink
fix : answer type error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Son-GyeongSik committed Nov 24, 2023
1 parent dd793b3 commit 781e7b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/quiz/quizv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ async def generate_quizzes(summaries: list):
for quiz in quiz_list:
if isinstance(quiz['answer'], list) and len(quiz['answer']) > 0:
quiz['answer'] = quiz['answer'][0]

if isinstance(quiz['answer'], str):
quiz['answer'] = int(quiz['answer'])

if quiz['answer'] == 0:
quiz['answer'] = 1
Expand Down

0 comments on commit 781e7b8

Please sign in to comment.