Hi, I have this API:
```py
class OrderListApi(generics.ListAPIView):
serializer_class = OrderSerializer
model = serializer_class.Meta.model
pagination_class = StandardResultsSetPagination
permission_classes = [IsAuthenticated]
filter_backends = (filters.DjangoFilterBackend,)
filterset_fields = ('order_number',)
def get_queryset(self, *args, **kwargs):
current_company = self.request.user.staff.company
who = list(current_company.clients.values_list('id', flat=True))
who = Company.nd_objects.filter(id__in=who)
ords = self.model.nd_objects.filter(owner__in=who)
return self.filter_queryset(ords).order_by('-order_number')
```
which pulls data our of database nicely, however for some reason the
`filterset_fields = ('order_number',)` is totally ignored, so when i pull
`/api/v1/orders/list/?page=1` i get the same result as when i do
`/api/v1/orders/list/?page=1&order_number=1046` What am I missing here?
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-rest-framework/82185d39-5568-4640-90d6-e9a1d62588e6n%40googlegroups.com.