Skip to content

Commit

Permalink
load question from correct year when importing action scores
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed Jul 25, 2024
1 parent f9f75dd commit c2f6f38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scoring/management/commands/import_actions_scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ def import_question_scores(self):
# import related fields in bulk at the start
councils = {x.gss_code: x for x in Council.objects.all()}
plan_scores = {x.council: x for x in PlanScore.objects.filter(year=self.YEAR)}
questions = {x.code: x for x in PlanQuestion.objects.all()}
questions = {
x.code: x for x in PlanQuestion.objects.filter(section__year=self.YEAR)
}

section_codes = {name: code for code, name in self.SECTIONS.items()}

Expand Down

0 comments on commit c2f6f38

Please sign in to comment.