Skip to content

Commit

Permalink
Fixup. Format code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed May 27, 2024
1 parent da43a2e commit 71df363
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pod/quiz/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,15 +494,17 @@ def get_initial_data(existing_questions=None) -> str:
initial_data = {
"existing_questions": [
{
"short_answer": question.answer
if question.get_type() == "short_answer"
else None,
"long_answer": question.answer
if question.get_type() == "long_answer"
else None,
"choices": json.loads(question.choices)
if question.get_type() in {"single_choice", "multiple_choice"}
else None,
"short_answer": (
question.answer if question.get_type() == "short_answer" else None
),
"long_answer": (
question.answer if question.get_type() == "long_answer" else None
),
"choices": (
json.loads(question.choices)
if question.get_type() in {"single_choice", "multiple_choice"}
else None
),
# Add other datas needed for JS fields
}
for question in existing_questions
Expand Down

0 comments on commit 71df363

Please sign in to comment.