prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Períodos de parlamentares sumiram
  ## Comportamento Esperado
  Devem aparecer todos os períodos dos parlamentares, correspondentes às legislaturas.
  
  ## Comportamento Atual
  Aparecem apenas da 6ª legislatura à atual.
  
  Passos para Reproduzir (para bugs)
  https://sapl.agudo.rs.leg.br/parlamentar/
  
  ## Contexto
  Pesquisa de parlamentares por legislatura.
  
  ## Imagens do Ocorrido
  ![Captura de tela de 2020-04-22 08-08-12](https://user-images.githubusercontent.com/19169882/79975386-4579c300-8471-11ea-95b9-96459516774f.png)
  
  ## Seu Ambiente
  Versão usada (Release): 3.1.160-RC11
  Nome e versão do navegador: Versão 80.0.3987.163 (Versão oficial)
  Nome e versão do Sistema Operacional (desktop ou mobile): Ubuntu 16.04 64 bits
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `sapl/api/pagination.py`
  Content:
  ```
  1 from django.core.paginator import EmptyPage
  2 from rest_framework import pagination
  3 from rest_framework.response import Response
  4 
  5 
  6 class StandardPagination(pagination.PageNumberPagination):
  7     page_size = 10
  8     page_size_query_param = 'page_size'
  9     max_page_size = 50
  10 
  11     def get_paginated_response(self, data):
  12         try:
  13             previous_page_number = self.page.previous_page_number()
  14         except EmptyPage:
  15             previous_page_number = None
  16 
  17         try:
  18             next_page_number = self.page.next_page_number()
  19         except EmptyPage:
  20             next_page_number = None
  21 
  22         return Response({
  23             'pagination': {
  24                 'previous_page': previous_page_number,
  25                 'next_page': next_page_number,
  26                 'start_index': self.page.start_index(),
  27                 'end_index': self.page.end_index(),
  28                 'total_entries': self.page.paginator.count,
  29                 'total_pages': self.page.paginator.num_pages,
  30                 'page': self.page.number,
  31             },
  32             'results': data,
  33 
  34         })
  35
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/sapl/api/pagination.py b/sapl/api/pagination.py
  --- a/sapl/api/pagination.py
  +++ b/sapl/api/pagination.py
  @@ -8,6 +8,11 @@
       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()
  
verification_info: {"golden_diff": "diff --git a/sapl/api/pagination.py b/sapl/api/pagination.py\n--- a/sapl/api/pagination.py\n+++ b/sapl/api/pagination.py\n@@ -8,6 +8,11 @@\n     page_size_query_param = 'page_size'\n     max_page_size = 50\n \n+    def paginate_queryset(self, queryset, request, view=None):\n+        if request.query_params.get('get_all', False) == 'true':\n+            return None\n+        return super().paginate_queryset(queryset, request, view=view)\n+\n     def get_paginated_response(self, data):\n         try:\n             previous_page_number = self.page.previous_page_number()\n", "issue": "Per\u00edodos de parlamentares sumiram\n## Comportamento Esperado\r\nDevem aparecer todos os per\u00edodos dos parlamentares, correspondentes \u00e0s legislaturas.\r\n\r\n## Comportamento Atual\r\nAparecem apenas da 6\u00aa legislatura \u00e0 atual.\r\n\r\nPassos para Reproduzir (para bugs)\r\nhttps://sapl.agudo.rs.leg.br/parlamentar/\r\n\r\n## Contexto\r\nPesquisa de parlamentares por legislatura.\r\n\r\n## Imagens do Ocorrido\r\n![Captura de tela de 2020-04-22 08-08-12](https://user-images.githubusercontent.com/19169882/79975386-4579c300-8471-11ea-95b9-96459516774f.png)\r\n\r\n## Seu Ambiente\r\nVers\u00e3o usada (Release): 3.1.160-RC11\r\nNome e vers\u00e3o do navegador: Vers\u00e3o 80.0.3987.163 (Vers\u00e3o oficial)\r\nNome e vers\u00e3o do Sistema Operacional (desktop ou mobile): Ubuntu 16.04 64 bits\r\n\r\n\n", "before_files": [{"content": "from django.core.paginator import EmptyPage\nfrom rest_framework import pagination\nfrom rest_framework.response import Response\n\n\nclass StandardPagination(pagination.PageNumberPagination):\n    page_size = 10\n    page_size_query_param = 'page_size'\n    max_page_size = 50\n\n    def get_paginated_response(self, data):\n        try:\n            previous_page_number = self.page.previous_page_number()\n        except EmptyPage:\n            previous_page_number = None\n\n        try:\n            next_page_number = self.page.next_page_number()\n        except EmptyPage:\n            next_page_number = None\n\n        return Response({\n            'pagination': {\n                'previous_page': previous_page_number,\n                'next_page': next_page_number,\n                'start_index': self.page.start_index(),\n                'end_index': self.page.end_index(),\n                'total_entries': self.page.paginator.count,\n                'total_pages': self.page.paginator.num_pages,\n                'page': self.page.number,\n            },\n            'results': data,\n\n        })\n", "path": "sapl/api/pagination.py"}], "after_files": [{"content": "from django.core.paginator import EmptyPage\nfrom rest_framework import pagination\nfrom rest_framework.response import Response\n\n\nclass StandardPagination(pagination.PageNumberPagination):\n    page_size = 10\n    page_size_query_param = 'page_size'\n    max_page_size = 50\n\n    def paginate_queryset(self, queryset, request, view=None):\n        if request.query_params.get('get_all', False) == 'true':\n            return None\n        return super().paginate_queryset(queryset, request, view=view)\n\n    def get_paginated_response(self, data):\n        try:\n            previous_page_number = self.page.previous_page_number()\n        except EmptyPage:\n            previous_page_number = None\n\n        try:\n            next_page_number = self.page.next_page_number()\n        except EmptyPage:\n            next_page_number = None\n\n        return Response({\n            'pagination': {\n                'previous_page': previous_page_number,\n                'next_page': next_page_number,\n                'start_index': self.page.start_index(),\n                'end_index': self.page.end_index(),\n                'total_entries': self.page.paginator.count,\n                'total_pages': self.page.paginator.num_pages,\n                'page': self.page.number,\n            },\n            'results': data,\n\n        })\n", "path": "sapl/api/pagination.py"}]}