Skip to content

Commit

Permalink
Add id to filter fields for children (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrApplejuice committed Apr 11, 2023
1 parent 77d4ba1 commit 5b07631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 5b07631

Please sign in to comment.