Add sections progress plugin

This commit is contained in:
Stefan Wehrmeyer 2022-03-14 14:29:02 +01:00
parent bde9bf6000
commit f83a193916
4 changed files with 18 additions and 9 deletions

View file

@ -27,13 +27,7 @@ class GovPlanSectionDetailView(GovernmentMixin, DetailView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["plans"] = (
GovernmentPlan.objects.filter(
categories__in=self.object.categories.all(), government=self.government
)
.distinct()
.order_by("title")
)
context["plans"] = self.context["object"].get_plans()
return context