Skip to content

Commit

Permalink
🐛 Fix excel import not working
Browse files Browse the repository at this point in the history
  • Loading branch information
mawoka-myblock authored May 19, 2024
1 parent a5b5d0c commit 573f7fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classquiz/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ async def handle_import_from_excel(data: BinaryIO, user: User) -> Quiz:
if answer is None:
continue
answers_list.append(ABCDQuizAnswer(answer=answer, right=str(a + 1) in correct_answers))
existing_question: dict = existing_quiz.questions[i]

existing_question: dict | None = None
if existing_quiz is not None:
existing_question: dict = existing_quiz.questions[i]
questions.append(
QuizQuestion(
question=question,
Expand Down

0 comments on commit 573f7fc

Please sign in to comment.