Fakultas Ilmu Komputer UI

Commit 051df134 authored by Jonathan Christopher Jakub's avatar Jonathan Christopher Jakub
Browse files

[REFACTOR] Fix paginated logs queryset is not sliced by page_size

parent 2e422a7b
Pipeline #41632 passed with stages
in 4 minutes and 11 seconds
...@@ -53,8 +53,7 @@ class LogAPIView(ListAPIView): ...@@ -53,8 +53,7 @@ class LogAPIView(ListAPIView):
paginator = PageNumberPagination() paginator = PageNumberPagination()
context = paginator.paginate_queryset(logs_querysets, request) context = paginator.paginate_queryset(logs_querysets, request)
serializer = LogSerializer(data=logs_querysets, many=True, context=context) serializer = LogSerializer(context, many=True)
serializer.is_valid()
serializer_data = serializer.data serializer_data = serializer.data
return paginator.get_paginated_response(serializer_data) return paginator.get_paginated_response(serializer_data)
Supports Markdown
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