Skip to content

Commit

Permalink
simplify query
Browse files Browse the repository at this point in the history
  • Loading branch information
aaxelb committed Jan 17, 2024
1 parent 5f1e76a commit 4c15bb3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions api/subjects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from api.base import permissions as base_permissions
from api.subjects.serializers import SubjectSerializer, SubjectsRelationshipSerializer
from api.taxonomies.utils import optimize_subject_query
from osf.models import Subject, PreprintProvider
from osf.models import Subject
from framework.auth.oauth_scopes import CoreScopes


Expand Down Expand Up @@ -109,9 +109,7 @@ class SubjectList(JSONAPIBaseView, generics.ListAPIView, ListFilterMixin):

def get_default_queryset(self):
return optimize_subject_query(
Subject.objects.filter(
provider=PreprintProvider.get_default(),
),
Subject.objects.filter(bepress_subject__isnull=True),
)

def get_queryset(self):
Expand Down

0 comments on commit 4c15bb3

Please sign in to comment.