Commit 40c7238e authored by John Red Medrano's avatar John Red Medrano

add filter_queryset to work the filterset library

parent 30c5e813
......@@ -107,10 +107,12 @@ class ChangeRequestFormsViewset(viewsets.ModelViewSet):
Q(requested_to_template_name__icontains=search_key.lower()) |
Q(requested_to_template_id__icontains=search_key.lower())
)
self.queryset = self.queryset.order_by('-created')
page = self.paginate_queryset(self.queryset)
queryset = self.filter_queryset(self.get_queryset())
page = self.paginate_queryset(queryset)
if page is not None:
serializer = self.get_serializer(page, many=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment