From 71df363f8a6023df4f8503f87358e70bec66edd3 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 27 May 2024 11:12:30 +0000 Subject: [PATCH] Fixup. Format code with Black --- pod/quiz/views.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pod/quiz/views.py b/pod/quiz/views.py index 3b55f7b648..beb3b124a2 100644 --- a/pod/quiz/views.py +++ b/pod/quiz/views.py @@ -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