Moved project filtering to the right place - the queryset
This commit is contained in:
@@ -262,7 +262,7 @@ class WorkAddToProject(CollectionMixin, FormView):
|
||||
qs = f.fields['project'].queryset
|
||||
|
||||
# Limit to projects for ensembles where we are an admin and they haven't occured yet
|
||||
qs = qs.filter(ensemble__admins=self.request.user, event_date__gt=now())
|
||||
qs = qs.for_user(self.request.user).current()
|
||||
|
||||
# dont show projects already added to
|
||||
work = self.get_object()
|
||||
|
||||
Reference in New Issue
Block a user