From 5b0763161b97a6047f77e1e8160cc58ea4d71bb4 Mon Sep 17 00:00:00 2001 From: "Paul K. Gerke" Date: Tue, 11 Apr 2023 19:45:08 +0200 Subject: [PATCH] Add id to filter fields for children (#625) --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index edad1ed6..f36b8a1d 100644 --- a/api/views.py +++ b/api/views.py @@ -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"