From 6fa51350a1f6cae4ea43bd1dca708d48afe32a99 Mon Sep 17 00:00:00 2001 From: Leandro Roberto Date: Thu, 21 Mar 2019 15:42:12 -0300 Subject: [PATCH] HOT-FIX: corrige forma de capturar query_string https://docs.djangoproject.com/en/1.11/ref/request-response/#django.http.HttpRequest.META --- sapl/base/views.py | 2 +- sapl/parlamentares/views.py | 2 +- sapl/sessao/views.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sapl/base/views.py b/sapl/base/views.py index ee4c77fe0..56aeb58e2 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -1461,7 +1461,7 @@ class PesquisarUsuarioView(PermissionRequiredMixin, FilterView): data = self.filterset.data url = '' if data: - url = "&" + str(self.request.environ['QUERY_STRING']) + url = "&" + str(self.request.META['QUERY_STRING']) if url.startswith("&page"): ponto_comeco = url.find('username=') - 1 url = url[ponto_comeco:] diff --git a/sapl/parlamentares/views.py b/sapl/parlamentares/views.py index b87831407..772f06eaa 100644 --- a/sapl/parlamentares/views.py +++ b/sapl/parlamentares/views.py @@ -207,7 +207,7 @@ class PesquisarParlamentarView(FilterView): data = self.filterset.data url = '' if data: - url = "&" + str(self.request.environ['QUERY_STRING']) + url = "&" + str(self.request.META['QUERY_STRING']) if url.startswith("&page"): ponto_comeco = url.find('nome_parlamentar=') - 1 url = url[ponto_comeco:] diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index fe0e12d77..cd37b2b2b 100755 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -3086,7 +3086,7 @@ class PesquisarSessaoPlenariaView(FilterView): # Então a ordem da URL está diferente data = self.filterset.data if data and data.get('data_inicio__year') is not None: - url = "&" + str(self.request.environ['QUERY_STRING']) + url = "&" + str(self.request.META['QUERY_STRING']) if url.startswith("&page"): ponto_comeco = url.find('data_inicio__year=') - 1 url = url[ponto_comeco:]