prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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
  
  
  
  </issue>
  <code>
  [start of sapl/api/pagination.py]
  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 of sapl/api/pagination.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
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"}]}