Skip to content

Commit

Permalink
#35 rename reference uri to population uri
Browse files Browse the repository at this point in the history
  • Loading branch information
D-GopalKrishna committed Apr 10, 2024
1 parent 744b5f9 commit 159bb06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/composer/api/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ class KnowledgeStatementFilterSet(rest_framework.FilterSet):
via_uris = ListCharFilter(method='filter_via_uris', label='Via URI')
destination_uris = ListCharFilter(method='filter_destination_uris', label='Destination URI')
origin_uris = ListCharFilter(method='filter_origin_uris', label='Origin URI')
reference_uris = ListCharFilter(method='filter_reference_uris', label='Reference URI')
population_uris = ListCharFilter(method='filter_population_uris', label='Reference URI')

class Meta:
model = ConnectivityStatement
fields = ['via_uris', 'destination_uris', 'origin_uris', 'reference_uris']
fields = ['via_uris', 'destination_uris', 'origin_uris', 'population_uris']
distinct = True

@property
def qs(self):
return super().qs.distinct()

def filter_reference_uris(self, queryset, name, value):
def filter_population_uris(self, queryset, name, value):
return queryset.filter(reference_uri__in=value)

def filter_via_uris(self, queryset, name, value):
Expand Down

0 comments on commit 159bb06

Please sign in to comment.