Skip to content

Commit

Permalink
fixup! add dev command to import answers from all_answers_data.csv
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Jul 30, 2024
1 parent 08da73b commit da7851a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crowdsourcer/management/commands/import_answers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit da7851a

Please sign in to comment.