From ad0d81780517c7a3a2afaa37f4405dfba169d36a Mon Sep 17 00:00:00 2001 From: Ulysses Lara Date: Mon, 27 Apr 2020 11:36:11 -0300 Subject: [PATCH] =?UTF-8?q?Fix=20#3148=20-=20adequando=20pagina=C3=A7?= =?UTF-8?q?=C3=A3o=20(#3150)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/api/pagination.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sapl/api/pagination.py b/sapl/api/pagination.py index 47d35ee65..3c77a7ee3 100644 --- a/sapl/api/pagination.py +++ b/sapl/api/pagination.py @@ -8,6 +8,11 @@ class StandardPagination(pagination.PageNumberPagination): page_size_query_param = 'page_size' max_page_size = 50 + def paginate_queryset(self, queryset, request, view=None): + if request.query_params.get('get_all', False) == 'true': + return None + return super().paginate_queryset(queryset, request, view=view) + def get_paginated_response(self, data): try: previous_page_number = self.page.previous_page_number()