Skip to content

Commit

Permalink
build: Merge branch 'fix/taxonomy-terms-ecosystems-renamed-lang-codes…
Browse files Browse the repository at this point in the history
…' into staging
  • Loading branch information
josebui committed Sep 26, 2023
2 parents 37a5eaf + 1f9430d commit b283008
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions terraso_backend/apps/graphql/schema/taxnomy_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

logger = structlog.get_logger(__name__)

VALID_TYPES = [key for (key, text) in TaxonomyTerm.TYPES]


class TaxonomyTermNode(DjangoObjectType):
id = graphene.ID(source="pk", required=True)
Expand All @@ -42,3 +44,7 @@ class Meta:
)
interfaces = (relay.Node,)
connection_class = TerrasoConnection

@classmethod
def get_queryset(cls, queryset, info):
return queryset.filter(type__in=VALID_TYPES)

0 comments on commit b283008

Please sign in to comment.