Use active flag to show notices, disable follow, request, send update feature
This commit is contained in:
parent
68e48a04e8
commit
f176380761
4 changed files with 225 additions and 221 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue