Add id to filter fields for children (#625)

This commit is contained in:
Paul K. Gerke 2023-04-11 19:45:08 +02:00 committed by GitHub
parent 77d4ba1920
commit 5b0763161b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ class ChildViewSet(viewsets.ModelViewSet):
queryset = models.Child.objects.all()
serializer_class = serializers.ChildSerializer
lookup_field = "slug"
filterset_fields = ("first_name", "last_name", "slug", "birth_date")
filterset_fields = ("id", "first_name", "last_name", "slug", "birth_date")
ordering_fields = ("birth_date", "first_name", "last_name", "slug")
ordering = "-birth_date"