diff --git a/hypha/apply/api/v1/filters.py b/hypha/apply/api/v1/filters.py index 23764e78c4c78896ebe0be708404d566be6341d2..025aa4f9a112369b98755947edeb588cbec30c9c 100644 --- a/hypha/apply/api/v1/filters.py +++ b/hypha/apply/api/v1/filters.py @@ -45,7 +45,7 @@ class SubmissionsFilter(filters.FilterSet): ) id = filters.ModelMultipleChoiceFilter( field_name='id', - queryset=ApplicationSubmission.objects.current().with_latest_update(), + queryset=ApplicationSubmission.objects.exclude_draft().current().with_latest_update(), method='filter_id' ) diff --git a/hypha/apply/api/v1/views.py b/hypha/apply/api/v1/views.py index b5b9e2baaaecf122b25c7607be59f193fc4a579a..be67214edfea966f331c7ca9afdbe553acfc8d7d 100644 --- a/hypha/apply/api/v1/views.py +++ b/hypha/apply/api/v1/views.py @@ -62,8 +62,8 @@ class SubmissionViewSet(viewsets.ReadOnlyModelViewSet, viewsets.GenericViewSet): def get_queryset(self): if self.action == 'list': - return ApplicationSubmission.objects.current().with_latest_update() - return ApplicationSubmission.objects.all().prefetch_related( + return ApplicationSubmission.objects.exclude_draft().current().with_latest_update() + return ApplicationSubmission.objects.exclude_draft().prefetch_related( Prefetch('reviews', Review.objects.submitted()), )