Use active flag to show notices, disable follow, request, send update feature

This commit is contained in:
Stefan Wehrmeyer 2025-01-27 14:21:28 +01:00
parent 68e48a04e8
commit f176380761
4 changed files with 225 additions and 221 deletions

View file

@ -109,7 +109,9 @@ class GovPlanProposeUpdateView(GovernmentMixin, LoginRequiredMixin, UpdateView):
return redirect(self.object)
def get_queryset(self):
qs = GovernmentPlan.objects.filter(government=self.government)
qs = GovernmentPlan.objects.filter(
government=self.government, government__active=True
)
if self.request.user.is_authenticated and self.request.user.is_staff:
return qs
return qs.filter(public=True)