From 5dcb6b0fb9f6262e0650e84cc600573f177e5ffd Mon Sep 17 00:00:00 2001 From: Luciano Almeida Date: Tue, 9 Aug 2016 12:46:15 -0300 Subject: [PATCH] =?UTF-8?q?Correct=20error=20caused=20by=20django=20versio?= =?UTF-8?q?n=20upgrade=20in=20Munic=C3=ADpios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luciano Almeida --- sigi/apps/utils/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sigi/apps/utils/__init__.py b/sigi/apps/utils/__init__.py index af36701..6bdcf1c 100644 --- a/sigi/apps/utils/__init__.py +++ b/sigi/apps/utils/__init__.py @@ -3,6 +3,7 @@ from unicodedata import normalize from django.contrib import admin from django.db import models +from django.contrib.admin import ModelAdmin class SearchField(models.TextField): @@ -39,4 +40,4 @@ def queryset_ascii(self, request): if 'q' in request.GET: request.GET._mutable = True request.GET['q'] = to_ascii(request.GET['q']) - return admin.ModelAdmin.queryset(self, request) + return admin.ModelAdmin.get_queryset(self, request)