From da7851afa5add4e70d187c4f3c125c871a4eb1f0 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Tue, 30 Jul 2024 16:13:04 +0100 Subject: [PATCH] fixup! add dev command to import answers from all_answers_data.csv --- crowdsourcer/management/commands/import_answers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crowdsourcer/management/commands/import_answers.py b/crowdsourcer/management/commands/import_answers.py index aedce4a..7ebdb53 100644 --- a/crowdsourcer/management/commands/import_answers.py +++ b/crowdsourcer/management/commands/import_answers.py @@ -236,9 +236,9 @@ def handle( if pd.isna(answer["page_number"]) is False: response_opts["page_number"] = answer["page_number"] if pd.isna(answer["evidence"]) is False: - response_opts["evidence"] = answer["evidence"] + response_opts["public_notes"] = answer["evidence"] if pd.isna(answer["public_notes"]) is False: - response_opts["public_notes"] = answer["public_notes"] + response_opts["evidence"] = answer["public_notes"] r = Response.objects.create(**response_opts) @@ -249,9 +249,9 @@ def handle( if pd.isna(answer["page_number"]) is False: defaults["page_number"] = answer["page_number"] if pd.isna(answer["evidence"]) is False: - defaults["evidence"] = answer["evidence"] + defaults["public_notes"] = answer["evidence"] if pd.isna(answer["public_notes"]) is False: - defaults["public_notes"] = answer["public_notes"] + defaults["evidence"] = answer["public_notes"] if question.question_type != "multiple_choice": defaults["option"] = option