Skip to content

Commit

Permalink
[scorecards] load question based on year
Browse files Browse the repository at this point in the history
  • Loading branch information
struan committed May 28, 2024
1 parent fc25399 commit 0a89758
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,9 @@ class QuestionView(PrivateScorecardsAccessMixin, SearchAutocompleteMixin, Detail

def get_object(self):
return get_object_or_404(
PlanQuestion.objects.select_related("section"), code=self.kwargs["code"]
PlanQuestion.objects.select_related("section"),
code=self.kwargs["code"],
section__year=self.request.year,
)

def get_context_data(self, **kwargs):
Expand Down

0 comments on commit 0a89758

Please sign in to comment.