From 1cc3cb0514586ece78aa7b03bf19e83e7b3789a3 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 1 Apr 2025 15:37:12 +0200 Subject: [PATCH 1/1] add search option --- src/documents/api/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/documents/api/views.py b/src/documents/api/views.py index 36e886c2..751a9d41 100644 --- a/src/documents/api/views.py +++ b/src/documents/api/views.py @@ -24,7 +24,10 @@ class ChunkList(ListAPIView): queryset = models.Chunk.objects.all() serializer_class = serializers.ChunkSerializer filterset_fields = ['user', 'stage'] - search_fields = ['book__title'] + search_fields = [ + 'book__title', + '=book_slug', + ] def get_queryset(self): return models.Chunk.get_visible_for(self.request.user) -- 2.20.1